Activity extensions
In Active Roles, administrators can configure workflow activities of the pre-defined types that are installed with Active Roles. By default, the list of activities in the Workflow Designer contains only the pre-defined activity types, such as Approval Activity or Notification Activity. It is possible to extend the list by adding new types of activity.
Each activity type determines a certain workflow action (for example, originating an approval task or notification) together with a collection of activity parameters to configure the workflow action (for example, parameters that specify the approvers or notification recipients). Active Roles builds upon this concept, providing the ability to implement and deploy custom types of workflow activity. It enables custom activity types to be created as necessary, and listed in the Workflow Designer along with the pre-defined activity types, allowing administrators to configure workflow activities that perform custom actions determined by those new types of workflow activity.
Active Roles allows the creation of custom activities based on the Script Activity built-in activity type. However, creating and configuring a script activity from scratch can be time-consuming. Custom activity types provide a way to mitigate this overhead. Once a custom activity type is deployed that points to a particular script, administrators can easily configure and apply workflow activities of that type, having those activities perform the actions determined by the script. The activity script also defines the activity parameters specific to the activity type.
Custom activity types provide an extensible mechanism for deploying custom workflow activities. This capability is implemented by using the Policy Type object class. Policy Type objects can be created by using the Active Roles console, with each object representing a certain type of custom workflow activity.
Design elements
The extensibility of workflow activity types is designed around two interactions: activity type deployment and activity type usage.
Activity type deployment
The deployment process involves the development of a script that implements the workflow action and declares the activity parameters the creation of a Script Module containing that script and the creation of a Policy Type object referring to that Script Module. To deploy an activity type to a different environment, you can export the activity type to an export file in the source environment and then import the file in the destination environment. The use of export files makes it easy to distribute custom activity types.
Activity type usage
This is the process of configuring workflow activities. It occurs whenever you add an activity to a workflow in the Workflow Designer. To add an activity to a workflow, you drag the desired activity type from the toolbox onto the workflow process diagram. The toolbox, located on the left of the diagram, lists all the activity types defined in Active Roles, including the custom activity types. For each activity of a custom type the Workflow Designer provides a page for configuring the activity parameters specific to that activity type. Once the activity parameters have been configured, the workflow contains a fully functional activity of the selected custom type.
Active Roles provides a graphical user interface, complete with a programming interface, for creating and managing custom activity types. Using those interfaces, Active Roles workflows can be extended to meet the needs of a particular environment. Active Roles also has a deployment mechanism by which administrators put new types of workflow activity into operation.
Since workflow activity extension involves two interactions, Active Roles provides solutions in both areas. The Administration Service maintains activity type definitions, exposing activity types to its clients such as the Active Roles console or ADSI Provider. The console can be used to:
- Create a new custom activity type, either from scratch or by importing an activity type that was exported from another environment.
- Make changes to the definition of an existing custom activity type.
- Add an activity of a particular custom type to a workflow, making the necessary changes to the activity parameters provided for by the activity type definition.
Normally, an Active Roles expert develops a custom activity type in a separate environment, and then exports the activity type to an export file. An Active Roles administrator deploys the activity type in the production environment by importing the export file. After that, the Workflow Designer can be used to configure and apply activities of the new type.