General InformationThe precommit at Sample for Change Actions without DependencyThe 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 DependencyThe 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
}
| |||||||