Change Policy (changepolicy)

An opening ID is an entry point used to customize business logic. changepolicy is triggered when the object changes policy.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

See Also
Change Objects Cancellation (Precommit at changepolicy)

General Information

This opening ID is a precommit opening. For more information about the specificities of a precommit opening, see Precommit Openings.

Definition Description
PLM Opening ID changepolicy
Customization intent Not applicable
Execution context Server

Input Objects

Context Object Parameters

Table 1. Business Object Standard Parameters
Parameter Name Type Read or Write Comments
EVENT String Read Any of the supported events.
NAME String Read Business object name
ORGANIZATION String Read The organization that owns the business object
OWNER String Read The owner of the business object
PHYSICALID String Read The physical ID for the business object
POLICY String Read The business object policy
PROJECT String Read The project (collaborative space) that owns the business object
REVISION String Read Business object revision
TYPE String Read Business object type
Table 2. Additional Parameters for changepolicy
Parameter Name Type Read or Write Comments
NEWPOLICY String Read Target Policy name
AuditTags List Read Logging event of the transaction.

Sample

Trace(1, "Execution changepolicy on ", ThisObject.PLM_ExternalID )

Trace(1, "Test macro POLICY = ", Parameters.Macros.GetString("POLICY") )
Trace(1, "Test macro NEWPOLICY = ", Parameters.Macros.GetString("NEWPOLICY") )
Validation = true
if (ThisObject.policy <> Parameters.Macros.GetString("NEWPOLICY"))
{
  ReportUXMessage("Policy error !")
  Validation = false
}