CentraSite User's Guide : Policy Management : Managing Design and Change-Time Policies through CentraSite Control : Approval Policies : Multiple Actions in Approval Policy
Multiple Actions in Approval Policy
An approval policy can include actions in addition to the approval action. For example, you might create a policy like the example shown below, which validates a particular attribute in the asset and executes a custom action before it initiates the approval process.
Example
Validate Attribute Value
MyCustomAction
Initiate Approval
The example above illustrates how you can execute policy actions before you initiate the approval process. You can also insert actions after the approval action as long as those actions do not attempt to modify the object on which the policy is acting. When an object enters an approval process, CentraSite locks the object to prevent any modifications to the object while it is undergoing approval. The object remains locked until the approval policy and all additional policies that are triggered by the same event are complete.
If an approval policy includes an action that attempts to update the object after approval process has been initiated, that action fails. When this occurs, CentraSite immediately exits the policy and reverts the object to its previous state.
The following shows an approval policy that includes an action after the approval action. This policy executes successfully, because the action following the approval action simply sends out an email notification. It does not attempt to modify the asset on which the policy is acting:
Example A (correct)
Validate Classification
Set Instance and Profile Permissions
Initiate Approval
Send Email Notification
The following shows an approval policy that would not execute successfully. In this example, the Set Instance and Profile Permissions action follows the Initiate Approval action. Because the asset is locked at this point in the policy, the Set Instance and Profile Permissions action fails and the asset reverts to its previous lifecycle state:
Example B (incorrect)
Validate Classification
Initiate Approval
Set Instance and Profile Permissions
Send Email Notification
Tip:  
As a best practice, avoid executing any additional actions after the approval action in an approval policy. If there are actions that you need to execute after approval is granted, place those actions in a separate policy that executes on the PostStateChange event.
Copyright © 2015- 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback