General InformationThis opening ID is invoked when a change order is promoted to the In Approval state: ApprovalSchemaInitializationForChangeOrder This opening ID is used to customize the approval schema for change orders. The table below provides you with information related to the definition of the Opening ID.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following sample describes how to define approval schema for change order with approval schema.
/* Define constants */
/* Input elements */
let promotedChangeOrder("Change Order") //Declare CO object
let approvalSchema(ChangeApprovalSchema) // Declare approval schema
/* Elements to be used to create the approval schema */
let approvalSchemaLevel(ChangeApprovalSchemaLevel) // Declare approval schema first level
/* Retrieve the elements provided in input */
set promotedChangeOrder = Parameters->GetAttributeObject("ChangeOrder") // Retrieve CO object
set approvalSchema = Parameters->GetAttributeObject("ComputedApprovalSchema") // Retrieve approval schema
/* Apply the logic based on the inputs */
approvalSchema.setDemoteOnRejection(true) // Set Demote On Rejection attribute to true
set approvalSchemaLevel = approvalSchema.addApprovalSchemaLevel(false) // Add one level to the approval schema and retrieve it
approvalSchemaLevel.addApprovalTask("taskTitle","taskInstructions",false,"DemoLeaderAllCS", false, "Route Start Date", "2") // Add a task the level with “taskTitle” as title, “taskInstructions” as instruction details, no delegation allowed, “DemoLeaderAllCS” as assigned reviewer, no user group, default route start date, estimated completion duration
The following sample describes how to define approval schema for change order with route template.
/* Define constants */
/* Input elements */
let promotedChangeOrder("Change Order") //Declare CO object
let approvalSchema(ChangeApprovalSchema) // Declare approval schema
/* Retrieve the elements provided in input */
set promotedChangeOrder = Parameters->GetAttributeObject("ChangeOrder") // Retrieve CO object
set approvalSchema = Parameters->GetAttributeObject("ComputedApprovalSchema") // Retrieve approval schema
/* Apply the logic based on the inputs */
approvalSchema.setDemoteOnRejection(false) // Deactivate demote on rejection
approvalSchema.addRouteTemplate("testRouteGenerationFromSupersedingBLRTNoTriggersCORT", "1") // Set existing Route Template in approval schema (name: "testRouteGenerationFromSupersedingBLRTNoTriggersCORT", revision: “1”)
For
For
The first argument is the task title. The second argument is the task instructions. The third argument is to allow delegation ( The fourth argument is the identifier or the trigram of a person, or a user group that has a unique title.
The fifth argument indicates if the fourth argument is a person (
The sixth argument indicates The seventh argument indicates the due date in days from the previous argument. | |||||||||||||||||||||||||||||