Uploading Action Rules to Action Templates
Before you upload a Java action rule, you must first create a .zip file as described in
Creating Action Rules.
If you want to upload a Groovy script rule, the .groovy file can contain the following variables. You cannot upload external libraries.
Variable | Description |
entity | This represents the RegistryObject which is in the context. The following fields are available in this object: Name Description State |
policyContext | The PolicyContext in which the policy is running. |
assertion | The IAssertionInstance that is in execution. |
result | The result object that has the status and message. Set the result.successMessage or result.failureMessage. Based on the message, the status is inferred. If you fail to set a message, the status will be treated as a successful execution with an empty message. |
To upload an action rule
There are two ways you can upload a rule’s .zip file or .groovy file to a custom action template:
If you are uploading the rule to a custom action template you created using the CentraSite Control, you upload the rule (either a Java .zip file or a .groovy file) when you create the action template, on the Add Action Template page. For procedures, see Adding an Action Template to a Custom
Action Category. —OR—
If you are uploading the rule to a custom action template that you created programmatically, you upload the rule (either a Java .zip file or a .groovy file) using a JAXR-based call in the action template.