Change Objects Cancellation (Precommit at changepolicy)

You can use the existing precommit at changepolicy to customize the business logics for cancellation of the following change objects:

  • Change Requests
  • Change Orders
  • Change Actions
Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

The precommit at changepolicy is invoked by default when the user cancels a change object. With use of this business logic you can customize the rules for change object cancellations. For more information on the precommit openings, see Change Policy (changepolicy).

Sample for Change Actions without Dependency

The following sample describes how to define a business logic to refrain users from cancelling a change actions if proposed changes are connected to it.

/* Define constants */
let proposedChanges (List)
let proposedChangesSize (Integer)

/* By default it's allowed */
Validation = true

/* Proposed Change logic */
set proposedChanges = ThisObject.getProposedChanges()
set proposedChangesSize = proposedChanges.Size()

if(proposedChangesSize <> 0)
{
	Validation = false
}

Sample for Change Action with Dependency

The following sample describes how to define a business logic that refrains users from cancelling a change action having downstream dependency.

/* Define constants */
let changeDependencies (ChangeActionDependencies)
let downstreamDepChanges (List)
let downstreamDepChangesSize (Integer)

/* By default it's allowed */
Validation = true

/* Proposed Change logic */
set downstreamDepChanges = ThisObject. getChangeActionDependencies()
set downstreamDepChangesSize = downstreamDepChanges.Size()

if(downstreamDepChangesSize <> 0)
{
	Validation = false
}