Configuring Policies that Execute on Lifecycle State Changes
If you create a policy that executes on the PreStateChange or PostStateChange event type, you must configure the policy's States tab. The settings on this tab identify the specific state changes that will trigger the policy. This tab also specifies whether the policy is to be executed before or after the object is switched to a specified state.
When creating policies that execute on state changes, keep the following points in mind:
Policies that are triggered by a state change execute when an object
switches to a specified state (called the
target state). The object's state prior to the change is immaterial. For example, if you have a lifecycle model with the states:
Test,
Production and
Offline, and you have a policy that specifies the
Offline target state, that policy will execute anytime the object switches to the
Offline state. It does not matter whether the transition occurs from the
Test state or the
Production state.
Policies that are triggered by a state change are executed regardless of whether the state change is initiated from the
CentraSite Control UI, the API (e.g., a custom client program) or another policy.
You cannot specify a target state on the
States tab unless that state has already been defined in a lifecycle model. Additionally, the lifecycle model must be active. In other words, you cannot completely configure a policy that executes on a state change until you have created and activated the lifecycle model whose state(s) will trigger the policy.
If you configure the policy to execute before the object's state is changed (i.e., on a PreStateChange event), and any action in the policy fails, the state change will not occur.