The additional settings specify whether to stop the workflow if it runs longer that a certain time period. Click the Additional settings link on the Workflow Options and Start Conditions page to view or change the following setting:
- Terminate the workflow if it runs longer than: <time period>
This setting allows you to limit the amount of time the workflow is allowed to run. Use this setting to limit the automation workflow that might take a long period of time to run, causing an inconvenience to the user.
When you configure workflow options and start conditions for an automation workflow, you can set up workflow parameters and assign values to workflow parameters. Parameter values are used by the workflow activities when the workflow is running. An activity may retrieve the value of the desired parameter and perform the action depending upon the parameter value.
By default, the workflow does not have any parameters defined. You can add, modify (edit) or remove parameter definitions on the Parameters page. Once the definition of a parameter has been added to the workflow, you can:
-
Assign a value to the parameter: To do this, select the parameter from the list on the Parameters page and click View or change parameter value. The value assigned to the parameter is stored in the workflow definition. The workflow activities can retrieve the parameter value from the workflow definition when the workflow is running.
-
Configure the parameter so that the user can set the parameter value when starting the workflow on demand: To do this, select the parameter from the list on the Parameters page, click Edit, and then clear the Don’t show this parameter when starting the workflow on demand check box. Active Roles will prompt the user to set the parameter value when the user starts the workflow on demand. The parameter value supplied by the user will only be used during the current run of the workflow.
-
View or change various properties of the parameter: To do this, select the parameter from the list in the Parameters page, click Edit, and then use the options in the Parameter Definition dialog.
Each parameter has a number of properties that define it, including the parameter name, parameter description, syntax of parameter values, a list of acceptable parameter values, whether the parameter accepts a single value or multiple values, and whether the parameter must have a value. The acceptable values can be determined either by a static list of values or by using a script. In the latter case, the script calculates the list of the acceptable values each time the workflow is started. A script can also be used to assign a value to the parameter. The script calculates the value each time the workflow is started.
For more information about workflow parameters, see Configuring workflow parameters.
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.