Enabling or disabling an activity
Temporarily disabling an activity may be useful when the workflow is under construction so the workflow definition is not finalized and the activity should not run until a certain time.
To disable an activity or enable a disabled activity
-
In the Active Roles Console tree, select the workflow definition to display the workflow as a process diagram.
-
In the process diagram, right-click the activity and click Disable or Enable, respectively.
While an activity is disabled in a given workflow, Active Roles skips that activity when running that workflow. When you enable a disabled activity in a given workflow, you allow Active Roles to run that activity when running that workflow.
Enabling or disabling a workflow
Temporarily disabling a workflow may be useful when the workflow is under construction so the workflow definition is not finalized and the activities included in the workflow should not run until a certain time.
To disable a workflow or enable a disabled workflow
While a workflow is disabled, Active Roles does not run any activities included in that workflow regardless of the workflow start conditions. When you enable a disabled workflow, you allow Active Roles to run the activities included in that workflow.
Using the initialization script
When running a workflow instance, Active Roles uses a single PowerShell operating environment, referred to as a runspace, for all script activities held in that workflow. The workflow runtime engine creates a runspace once the workflow instance has been started, and maintains the runspace during the initalization of the workflow instance.
When you configure a workflow, you can specify PowerShell commands you want the workflow runtime engine to run immediately after the runspace creation. These commands constitute the initialization script that the workflow engine runs prior to performing script activities.
With an initialization script, you can define runspace configuration data separately from the logic of the script activities and use it to initialize the environment for executing script activities. Specifically, you can:
-
Load PowerShell modules and snap-ins: All activity scripts can use the modules and snap-ins loaded in the initialization script, without having to load the prerequisite modules or snap-ins on a per-activity basis.
The modules and snap-ins loaded in the initialization script are available to all script activities at workflow runtime. For example, the Import-Module 'SmbShare' command added to the initialization script makes the Server Message Block (SMB) Share-specific cmdlets available to all script activities within the workflow.
-
Initialize environment-specific variables, referred to as global variables: All activity script can retrieve and update global variables, which makes it possible to exchange data between different activity scripts.
The global variables are visible to all script activities at workflow run time. For example, the $rGuid = [Guid]::NewGuid() command added to the initialization script makes the $rGuid variable available to all script activities within the workflow. To reference a variable that is defined in the initialization script, the activity script must use the $global: qualifier, such as $global:rGuid.
When the execution of the workflow instance is suspended (for example, waiting for approval), and then resumed (for example, after receiving an approval decision), the runspace is reinitialized so the global variables may change. If you need to preserve the value of a global variable, add the [Persist()] attribute to the variable's name in the initialization script, such as [Persist()]$rGuid = [Guid]::NewGuid(). The global variables defined in this way are saved to a persistent storage upon suspending the workflow instance and restored from the storage when the workflow instance is resumed. To save a variable, Active Roles creates and stores an XML-based representation of the object signified by that variable, similarly to the Export-Clixml command in Windows PowerShell. When restoring the variable, Active Roles retrieves the XML data that represents the object, and creates the object based on that data, similarly to the Import-Clixml command.
To view or change the initialization script
-
In the Active Roles Console tree, expand Configuration > Policies > Workflow, and select the workflow you want to configure.
This opens the Workflow Designer in the Details pane, representing the workflow definition as a process diagram.
-
In the Details pane, click Workflow options and start conditions to expand the area above the process diagram, and then click Configure.
-
Click the Initialization script tab in the dialog that opens.
The Initialization script tab displays the current script. You can add or modify the script by typing in the edit box on that tab.
Approval workflow
Approval workflows complement automated policies, to make provisioning and deprovisioning decisions based on human input. While automated policies require no manual intervention, approval-based fulfillment of administrative operations adds to process automation the ability to manually accept or deny operation requests, and to monitor the execution of request-processing tasks to ensure they are responded in a timely manner.
An Approval workflow can service a range of requests, which are user actions intended to perform administrative operations. Examples of such operations include the creation, modification, and deprovisioning of user accounts.
When a requested operation requires permission from certain individuals in an organization, a workflow can be started to coordinate the approval process. The system only performs the requested operation after approval is given by an authorized person.
Active Roles administrators can create and configure Approval workflows by using the Workflow Designer: a graphical tool provided in the Active Roles Console for constructing workflows. When designing an Approval workflow, the administrator specifies the kind of operations that start the workflow, and also adds Approval rules to the workflow. The Approval rules determine who is authorized to approve the operation, the required sequence of approvals, and who needs to be notified of approval tasks or decisions.
The Approval workflow solution provided by Active Roles includes:
-
The Workflow Designer for constructing workflows, available from the Active Roles Console. Use the Workflow Designer to configure an Approval workflow by adding approval activities to the workflow definition.
-
The directory management interfaces, such as the Web Interface or Active Roles Console for submitting operation requests for approval. For example, you can configure an Approval workflow so that when creating a user account via Active Roles, the user is only created if the action is approved beforehand.
-
The approval-related section of the Web Interface to manage operation requests. This section provides a “to-do” list of the approval tasks a designated user has to carry out, allowing the user to perform tasks such as approving or rejecting operation requests.