You can export Policy Type objects so that the definition of the activity types is stored in an XML file which can be imported in a different Active Roles environment. Exporting and then importing Policy Type objects make it easy to distribute custom activity types to other environments.
To export a Policy Type object or container
You can select multiple Policy Objects to export, or you can select a container to export all Policy Type objects and containers held in that container. In either case, the Export operation creates a single XML file that can later be imported to any container under the Policy Types node.
Export of Policy Type objects creates an XML file representing both the objects and the Script Modules containing the scripts for each activity type being exported. During an import, Active Roles creates the Policy Type objects and the Script Modules based on the data found in the XML file. As a result of the import, the activity types are replicated to the new environment and can be used the same way as in the environment from which they were exported.
You can import the exported Policy Type objects and containers, which will add them to a Policy Type container and allow you to configure and use custom activities defined by those Policy Type objects. All the data required to deploy the activity types is represented in an XML file. To see an example of the XML document that represents an activity type, export a Policy Type object and view the saved XML file.
To import the exported Policy Type objects and containers
-
In the Active Roles Console tree, under Configuration > Server Configuration > Policy Types, right-click the Policy Type container in which you want to import the exported Policy Type objects and containers.
-
Click Import Policy Types, and then open the XML file you want to import.
This will create new Policy Type objects and containers in the selected container. In addition, new Script Modules will be created in the Configuration > Script Modules container and associated with the newly created Policy Type objects.
Once a custom activity type has been deployed, an Active Roles administrator can add an activity of that type to a workflow. This is accomplished by dragging the activity type onto the workflow process diagram in the Workflow Designer.
To configure a workflow activity of a custom type
-
In the Active Roles Console tree, expand Configuration > Policies > Workflow, and select the workflow to which you want to add an activity.
This opens the Workflow Designer window in the details pane, representing the workflow definition as a process diagram.
-
In the details pane, drag the activity type from the left panel onto the process diagram.
The panel on the left of the workflow process diagram lists all the activity types defined in your Active Roles environment. The built-in activity types are listed in the Basic area, along with the custom activity types whose Policy Type objects are located directly in the Policy Types container. The other custom activity types are listed below the names of the containers that hold the corresponding Policy Type objects. The list includes only those containers that are located directly in the Policy Types container. The names of the intermediate containers are not shown.
-
Right-click the name of the activity you have added on the process diagram, and then click Properties.
-
On the Properties page, set parameter values for the activity: Click the name of a parameter in the list, and then click Edit.
Parameters control the behavior of the activity. When Active Roles executes the activity, it passes the parameter values to the script function. The actions performed by the script function, and the results of those actions, depend on the parameter values.
Clicking Edit displays a page where you can add, remove, or select a value or values for the selected parameter. For each parameter, the script being used by the activity defines the name of the parameter and other characteristics, such as a description, a list of possible values, the default value, and whether a value is required. If a list of possible values is defined, then you can only select values from that list.
-
Click OK to close the Properties dialog, and then click Save Changes in the Workflow Designer.
You can delete a Policy Type object when you no longer need to add activities of the type defined by that object.
Before you delete a Policy Type object, consider the following:
-
You can delete a Policy Type object only if no activities of the respective type exist in any workflow. Examine each workflow definition and remove the activities of that type, if any, from the workflow before deleting the Policy Type object.
-
Deleting a Policy Type object permanently deletes it from the Active Roles database. If you want to use this activity type again, you should export the Policy Type object to an XML file before deleting the object.
-
Deleting a Policy Type object does not delete the Script Module associated with that object. This is because the Script Module may be used by other activities. If the Script Module is no longer needed, it can be deleted separately.
To delete a Policy Type object