Using Policy Type containers
You can use a Policy Type container to store related Policy Type objects and other Policy Type containers.
Containers provide a means for additional categorization of custom activity types, making it easier to locate and select an activity type in the Workflow Designer. The activities toolbox next to the workflow process diagram lists the custom activity types along with the containers that hold the respective Policy Type objects. To prevent containers from cluttering the activities toolbox, the Workflow Designer displays only the containers that are direct descendants of the Policy Types container, and disregards the lower-level containers. To clarify this behavior, let us consider a path to a Policy Type object such as Policy Types/Container A/Container B/Object C. In this case, the Workflow Designer only displays Container A and the activity type C under Container A, disregarding Container B.
To create a new Policy Type container
- In the console tree, under Configuration/Server Configuration/Policy Types, right-click the Policy Type container in which you want to create a new container, and select New | Policy Type Container.
For example, if you want to create a new container in the root container, right-click Policy Types.
- In the New Object - Policy Type Container wizard, type a name and, optionally, a description for the new container.
The name of the container will be displayed in the Workflow Designer if the container is located directly in the Policy Types container.
- Click Next and follow the steps in the wizard to complete the creation of the new container.
Exporting activity types
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
- Right-click the Policy Type object or container in the Active Roles console, click Export and then specify an XML file to hold the export data.
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.
Importing activity types
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.
Configuring an activity of a custom type
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 upon 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 box, and then click Save Changes in the Workflow Designer.