Planning to Create Custom Actions
If you would like a policy to execute a task that is not provided by a built-in action, you can create a custom action to perform the work. For example, a custom action can consist of a Java class or a Groovy script that performs the required task, such as running a test, creating a required attribute, or logging an entry in an external database. You can insert custom actions into a policy just like you would insert a built-in action.
Creating a custom action consists of the following high-level steps:
1. Create a custom action category with which to associate the action.
2. Create an action template to specify the scope of objects and events to which the action applies.
3. For an action template to be used in a design or change time policy, you specify the location of your custom action rule, which fires when the action executes.
4. Add parameter templates to define the parameters that serve as input to the action.
There are two ways you can add custom actions:
You can use
CentraSite Control to create action categories and action templates, as described in
Adding Custom Actions Using the
CentraSite UI. Then, you create action rules using Java programs or Groovy scripts, which is described in
Creating Action Rules. You upload the rules into action templates when you create the action templates, using
CentraSite Control.
You can create action categories, action templates and action rules using Java programs or Groovy scripts, as described in
Adding Custom Actions Using APIs. Then, you upload the rules scripts to action templates using JAXR-based calls in the action templates.