Change Request Approval (ApprovalSchemaInitializationForChangeRequest)

An opening ID is an entry point used to customize business logic. The change request approval opening ID lets you define the approval schema for change requests.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked: ApprovalSchemaInitializationForChangeRequest

This opening ID is used to customize the approval schema for change requests.

The table below provides you with information related to the definition of the Opening ID.

Definition Description
PLM Opening ID ApprovalSchemaInitializationForChangeRequest
Customization intent Computation
Execution context Server

Input Objects

Input objects must be of the following types:

  • ThisObject: Change request
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
ChangeRequest Object Read The change request for which approval is required.
ComputedApprovalSchema Feature Write -

Sample

The following sample lets you define the approval schema for change requests.

/* Define constants */
/* Input elements */
let promotedChangeRequest("Change Request")
let approvalSchema(ChangeApprovalSchema)

/* Elements to be used to create the approval schema */
let approvalSchemaLevel(ChangeApprovalSchemaLevel)

/* Retrieve the elements provided in input */
set promotedChangeRequest = Parameters->GetAttributeObject("ChangeRequest")
set approvalSchema = Parameters->GetAttributeObject("ComputedApprovalSchema")

/* Apply the logic based on the inputs */
if(promotedChangeRequest.organization == "MyCompany")
{
               set approvalSchemaLevel = approvalSchema.addApprovalSchemaLevel(false)
approvalSchemaLevel.addApprovalTask("taskTitle","taskInstructions",false,"DemoLeaderAllCS", false, "Route Start Date", "2")
}