When you configure an automation workflow, you can specify PowerShell commands you want the workflow run-time engine to run immediately after creation of the PowerShell operating environment for the script activities held in that workflow. These commands constitute the initialization script that the workflow engine runs prior to performing script activities.
With the initialization script, 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.
-
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.
For more information, see Using the initialization script.
The Active Roles Console provides the Workflow Designer for creating and configuring automation workflows. First, you create an automation workflow definition. Then, you use the Workflow Designer to construct an automation workflow, saving the configuration data in the workflow definition.
To create an automation workflow definition
-
In the Active Roles Console tree, expand Configuration > Policies, right-click Workflow, and select New > Workflow.
-
Follow the steps in the New Workflow wizard:
-
On the Name and Description page, type in a name and, optionally, a description for the new workflow.
-
On the Workflow Type page, under This workflow is intended to start, click On user demand or on a scheduled basis (automation workflow).
-
On the Completion page, click Finish.
Once you have created a workflow definition, you can open it in the Workflow Designer to add workflow activities and specify workflow start conditions.
You can create containers to store related workflows and other containers. To create a workflow container, right-click Workflow in the Console tree and select New > Container. To create an automation workflow definition in a given container, right-click the container in the Console tree, and select New > Workflow.
You can delete an automation workflow definition as follows: In the Console tree under Configuration > Policies > Workflow, right-click the object representing the workflow definition, and click Delete.
The start conditions of an automation workflow determine the trigger that causes the workflow to start. You can use a time-based trigger or an event-based trigger to start an automation workflow. It is also possible to allow a workflow to be started on demand. Use the Workflow Designer to view or change the start conditions for an automation workflow.
To view or change the start conditions for an automation workflow
-
In the Active Roles Console tree, expand Configuration > Policies > Workflow, and select the automation workflow you want to configure.
This opens the Workflow Designer window in the details pane, representing the automation 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.
This opens the Workflow Options and Start Conditions page where you can view or change the following:
-
The schedule settings that determine the frequency with which to run the workflow. To enable these settings, select the Run the workflow on a schedule check box. This causes the workflow to run according to a schedule, and the options below the check box allow you to set the schedule. For details, see Run the workflow on a schedule.
-
The workflow can be run on demand. By selecting the Allow the workflow to be run on demand check box, you specify that users can manually run the workflow at any time regardless of the schedule. For more information, see Allow the workflow to be run on demand.
-
The “Run as” options determine the account under which to run the workflow. Click the “Run as” options link to view or change the account setting. For details, see “Run as” options for an automation workflow.
-
Choose whether to terminate the workflow if it runs longer that a certain time period. Click the Additional settings link to view or change that setting. For details, see Additional settings for an automation workflow.
-
Specify parameters to specify certain data when configuring or starting the workflow and then pass that data to workflow activities when the workflow is running. The data is represented as parameter values. To assign a value to a given parameter, navigate to the Parameters tab, select the parameter from the list, and then click View or change parameter value. For more information, see Parameters for an automation workflow.
When finished, click OK to close the Workflow Options and Start Conditions page, and then click Save Changes in the Workflow Designer.