Creating Workflows
From OpsWise Documentation Wiki
Overview
The Workflow definition tool is a graphical tool that allows you to select tasks, position them within a workflow and specify the dependency relationships between them.
The process of creating a workflow involves:
- Creating a new workflow task.
- Accessing the Workflow Editor and:
- Opening the Add Task window.
- Specifying parameters for fetching tasks.
- Dragging tasks onto the canvas.
- Adding connections and dependencies between the tasks.
- Defining the layout of the workflow.
- Saving the new workflow.
Workflows can be as simple or elaborate as necessary. Zooming and scrolling features are provided that allow you to work on small areas of a very large workflow, or to create simple ad-hoc workflows. Shown below is a sample workflow consisting of a variety of task types. There are no restrictions on the types of tasks that can be included as part of a single workflow and you can also put workflows within other workflows.
Use the icon reference for a quick guide to the tools available for building workflows; for more detailed instructions, see Defining a Workflow.
Rules for Creating Workflows
- You can include as many workflows within a workflow as needed.
- A single workflow can support multiple starting tasks. All starting tasks launch when the workflow launches.
- A workflow can include a task that is not connected to any other task. All disconnected tasks launch when the workflow launches.
Workflow Modes
The actions you can perform within the Workflow Editor sometimes depend on what mode you are in. The mode is set by clicking on an icon in the toolbar. The Workflow Editor has three modes:
- Connect — Clicking on a Connector icon (
or
) puts the Workflow Editor into Connect mode. You must be in Connect mode to create connections. You can also move objects around in Connect mode.
- Select — Clicking on the Select icon
puts the Workflow Editor into Select mode. You must be in Select or Connect mode to move objects around.
- Pan — Clicking on the Pan icon
puts the editor into Pan mode, which allows you to scroll around on the workflow. You can also use the Outline icon
to scroll around.
The remaining operations, including Save, Preview, Undo, Redo, Cut, Copy, Paste, Delete, Add Task, Zoom, Fit, Layout, Help, and Console can be performed in any mode.
A shadowed outline around the icon indicates what mode the Workflow Editor is in. The following example shows that the Workflow Editor is in Select mode.
Icon Reference
The table below describes the icons used to define workflows.
| Icon | Description |
|---|---|
| Back — Goes back to the previous screen. | |
| Open Workflow — Allows you to drag another workflow into the current workflow or temporarily switch to another workflow without closing the current workflow. Opens a window and displays a list of defined workflows. You can either double-click a workflow from the list to open it and edit it, or you can click and drag a workflow into the current workflow. If you open another workflow, use Open Workflow to return to the previous workflow. Hint: As a best practice, save your workflow before opening another one. | |
| Save — Saves the current workflow. | |
Add Task — Displays the Task Find window, which allows you to search for and select tasks for the workflow. To search for and select tasks:
|
|
Select — Enters Select mode, which allows you to click on tasks or links in order to move or delete them. Use this to perform any of the following:
|
|
| Pan — Enters Pan mode, which allows you to scroll to different areas of the workflow. | |
Connect (bent) and Connect (straight) — Enters Connect mode, which allows you to create links between tasks. To create a link:
|
|
| Undo — Click to undo the most recent change. | |
| Redo — Click to redo the most recent change that you undid by clicking Undo. | |
| Cut — Deletes the selected object or objects (tasks and links or both) and keeps a copy in memory. Use CTRL-Click to select and cut multiple objects. Hint: Do not use cut and paste to move workflow elements; use select and drag. | |
| Copy — Copies the selected object or objects (tasks, links or both). Use CTRL-Click to select and copy multiple objects. | |
| Paste — Pastes the copied or cut object or objects to the currently open workflow. | |
| Delete — Permanently deletes the selected object or objects. Delete does not keep a copy of the deleted objects in memory. | |
| Fit — Fits the workflow into the display. If necessary, this shrinks the icons and size of the workflow in order to make it fit. You can undo a Fit by selecting Actual Size |
|
| Zoom In — Zooms in (enlarges) the workflow. To return the workflow to its default size, select Actual Size |
|
| Zoom Out — Zooms out (diminishes) the workflow. To return the workflow to its default size, select Actual Size |
|
| Actual Size — Returns the workflow to its default size after a Fit or Zoom. | |
| Zoom — Opens a window that allows you to specify a zoom ratio. For example, to double the size of the workflow, enter 200 and click OK. To return the workflow to its default size, select Actual Size |
|
| Horizontal Layout — Reformats the workflow into a horizontal layout. | |
| Vertical Layout — Reformats the workflow into a vertical layout. | |
| Toggle Vertex Style — For running workflows, switches the icon display between status-related icons and task-related icons. This icon only appears on the icon bar when you are monitoring a running workflow. | |
Outline — For large workflows, the outline provides a way of positioning a specific area of the workflow in the display, without using the Pan icon.
|
|
| Help — Displays help documentation for workflows. | |
| Console — While a workflow is running, you can click the Console icon to display processing messages. For more details, see Monitoring Workflows. |
Defining a Workflow
Creating a New Workflow
- From the navigation pane, select Workflow Tasks. OpsWise Automation Center displays the Workflow Tasks list, as shown in the example below.
- Click New. A blank workflow screen opens.
- Using the field descriptions provided below as a guide, complete the fields as needed.
- Right-click on the title bar and select Save. The workflow is added to the database and additional buttons appear at the bottom.
- Click Edit Workflow to proceed into the Workflow Editor. OpsWise Automation Center displays a blank Workflow Editor screen.
- Follow the instructions provided below for adding tasks, creating connections, specifying conditions on connections, organizing, and saving your workflow. Or, see Icon Reference for a quick reference guide to each tool icon.
Field Descriptions on Workflow Task Screen
The table below describes the fields, buttons, and tabs on the Workflow task definition and task instance screens. Most fields appear on both screens; however they do not always appear at the same spot. In the latter case, the table provides a field description at the location found on the task definition screen. Some fields appear only on one of the screens. Field labels shown in bold appear only on the task instance screen and are labelled as such.
| Field Name | Description | |
|---|---|---|
| Task/Instance Name | Required. Name used within OpsWise Automation Center to identify this task. Up to 40 alphanumerics; variables supported. It is the user’s responsibility to develop a workable naming scheme for tasks. | |
| Invoked by | Task instance only; system-supplied. How the task instance was launched. Options:
Trigger: [Trigger Name] - The instance was launched by the named trigger. Workflow: [Workflow Name] - The instance was launched by the named workflow. Manually Launched - The instance was launched by a user. To identify the user who launched the instance: |
|
| Task | Task instance only; system-supplied. | |
| Instance Reference Id | Task instance only; system-supplied. | |
| Member of Groups | User-defined. Allows you to select one or more Opswise groups that this workflow definition belongs to. Click on the lock icon to unlock the field and select groups. | |
| Summary | User-supplied description of this task. | |
| Status | Task instance only; system-supplied. See Task Status. | |
| Status Description | Task instance only; system-supplied. Provides additional information, if any, about the status of the task. | |
| Start Time | Task instance only; system-supplied. The time the task started. | |
| Duration | Task instance only; system-supplied. The amount of time the task took to run. | |
| End Time | Task instance only; system-supplied. The time the task completed. | |
| User Estimated End Time | Task instance only; system-supplied. | |
| Shortest Estimated End Time | Task instance only; system-supplied. | |
| Average Estimated End Time | Task instance only; system-supplied. | |
| Longest Estimated End Time | Task instance only; system-supplied. | |
| Hold on Start | If enabled, when the task is launched it appears in the Activity display with a status of Held. The task runs when the user releases it. . | |
| User-Estimated Duration | The estimated amount of time it should normally take to run this task. | |
| Late Start | If enabled, and if the task instance starts after the time specified in the Late Start Time field (see below), the task instance is flagged as late. To determine whether a task instance started late, open the task instance and locate the Started Late field; the field is checked if the instance started late. | |
| Late Start Time (hh:mm) | The time after which the task start time is considered late. Use hh:mm, 24-hour time. | |
| Late Finish | If enabled, and if the task instance finishes after the time or period specified, the task instance is flagged as late. You can specify a time or duration to determine a late finish (see Late Finish Type below). To determine whether a task instance finished late, open the task instance and locate the Finished Late field; the field is checked if the instance finished after the specified time or lasted longer than expected. | |
| Late Finish Type | If Late Finish is enabled, use this field to specify whether you want to use time (see Late Finish Time below) or duration (see Late Finish Duration below) to determine whether the task instance finished late. | |
| Late Finish Time (hh:mm) | If Late Finish Type is Time, use this to specify the time after which the task finish time is considered late. Use hh:mm, 24-hour time. | |
| Late Finish Duration | If Late Finish Type is Duration, use this to specify the longest amount of time this task instance should take to run. You can specify any combination of days, hours, minutes, and seconds. | |
| Early Finish | If enabled, and if the task instance finishes before the time or period specified, the task instance is flagged as early. You can specify a time or duration to determine an early finish (see Early Finish Type below). To determine whether a task instance finished early, open the task instance and locate the Finished Early field; the field is checked if the instance finished before the specified time or did not last as long as expected. | |
| Early Finish Type | If Early Finish is enabled, use this field to specify whether you want to use time (see Early Finish Time below) or duration (see Early Finish Duration below) to determine whether the task instance finished early. | |
| Early Finish Time (hh:mm) | If Early Finish Type is Time, use this to specify the time before which the task finish time is considered early. Use hh:mm, 24-hour time. | |
| Early Finish Duration | If Early Finish Type is Duration, use this to specify the shortest amount of time this task instance should take to run. You can specify any combination of days, hours, minutes, and seconds. | |
| First Time Ran | System-supplied. Displays after task has been run. The date and time this task first ran. | |
| Lowest Instance Time | System-supplied. Displays after task has been run. The shortest amount of time this task has taken to run. | |
| Last Time Ran | System-supplied. Displays after task has been run. The last date and time the task ran. | |
| Average Instance Time | System-supplied. Displays after task has been run. The average amount of time this task takes to run. | |
| Number of Instances | System-supplied. Displays after task has been run. The number of times this task has run. | |
| Highest Instance Time | System-supplied. Displays after task has been run. The longest amount of time this task has taken to run. | |
| Last Instance Duration | System-supplied. Displays after task has been run. The amount of time the task took to run the last time it ran. | |
| Submit button | Submits the new record to the database. | |
| Update button | Saves updates to the record. | |
| Launch Task button | Manually launches the task. | |
| Delete button | Deletes the current record. | |
| Task Virtual Resources tab | Allows you to create virtual resource definitions for controlling access to resources by multiple tasks. See Creating Virtual Resources. | |
| Variables tab | Displays all variables associated with this task. | |
| Actions tab | Allows you to specify actions that the system will take automatically based on events that occur during the execution of this task. Events supported are task instance status, exit codes, late start, late finish, and early finish. Actions include:
|
|
| Task Run Criteria tab | ||
| Task Instances tab | System-supplied. Displays a list of all instances generated by this task. | |
| Triggers tab | Displays a list of all triggers that have been defined to launch this task. Also allows you to add new triggers. For instructions, see Triggers. | |
| Notes tab | Displays all notes associated with this task. See Runbook Notes. | |
Searching For and Adding Tasks
- Click the Add Task icon
. The Task Find window displays.
- Several methods are available for finding tasks:
- To find a specific task, type the name into the Task name field and click Search.
- To bring up a list of tasks whose names match a string, type the string into the Task name field and use one or more wildcards. The wildcard can appear anywhere in the string and you can use more than one if necessary. For example, to find tasks whose name begins with "Fee", type
Fee*
in the Task name field and click Search.
- To bring up a list of tasks of a specific type, such as Windows, select the task type from the drop down menu and click Search. OpsWise Automation Center fetches the task or tasks that match your search criteria.
- To add a task to the workflow canvas, click on the icon to the left of the task and drag it onto the canvas.
- Repeat these steps until you have added all the tasks you need.
- To close the Task Find window, click the X in the upper right corner. Or, to keep the window open but minimized, click the minimize icon.
Specifying Connections
You must first drag tasks onto the canvas before specifying connections between them.
- Click on one of the connectors, either
, which is either straight or diagonal, or
, which bends if necessary. This enters Connection mode.
- Click on the upstream task, that is, the task whose status will trigger the next task. For Firefox, make sure you click the center of the task icon; for Internet Explorer, click on the task name.
- Drag the cursor to the downstream task, that is, the task that will be triggered. As you drag, a dotted line appears to indicate the connection. Drag the connector all the way to the center of the downstream, highlighted task.
- When the cursor is at the center of the downstream task icon, let up on the mouse. The connector is in place and still highlighted. Optionally, you can reposition the connection by dragging it to a new location. Arrows on the connectors indicate the direction of the workflow.
- Repeat this process for other connectors you need to add.
Specifying Conditions on Connections
Once you have created connections between the tasks on a workflow, you can now specify what kind of dependency exists between the upstream and downstream task. The default condition is Success. That is, the downstream task runs if the upstream task runs to Success.
- Right-click on the connection for which you want to specify a condition.
- Select Conditions. The Conditions window displays.
- Specify one of the following conditions:
- Success -- Run the downstream task if the upstream task goes to Success.
- Failure -- Run the downstream task if the upstream task goes to Failure.
- Success/Failure -- Run the downstream task if the upstream task goes to Success or Failure.
- Exit Code(s) -- Run the downstream task if the upstream task returns one of the specified exit code(s). Format: Numeric. Use commas to list a series of exitcodes; use hyphens to specify a range. Example: 1,5, 22-30.
Success conditions are indicated by a solid line in the Workflow Editor; all other conditions display as a dotted line.
- Click OK.
Creating Conditional Paths
OpsWise Automation Center allows you to specify separate processing paths for each condition. For example, you may specify a group of tasks that will run if the upstream task goes to Success and a second group of tasks that will run if the upstream task goes to Failure. When OpsWise Automation Center recognizes that conditional paths have been specified, the tasks in the path whose condition is met run, and the tasks in the path whose condition is not met go to a Skipped status.
OpsWise Automation Center identifies a conditional path when:
- The upstream task goes to a finished status (Success or Failure)
- As a result, at least one downstream dependency is satisfied and at least one downstream dependency is not satisfied.
For example, Task A is at the top of the workflow. Three conditional paths have been specified: one for failure and two for success. Task A executes and goes to Success status. All the tasks in the failure path go to skipped; the tasks in the two success paths begin running normally.
As another example, Task A is at the top of the workflow. Two conditional paths have been specified: one for exit codes 1 through 10, the second for exit codes 11 through 20. If Task A completes with exit code 5, the first path runs and the second path is skipped. If Task A completes with exit code 15, the first path is skipped and the second path runs. If Task A completes with exit code 25, neither condition is satisfied and both paths remain in Waiting status.
Using Multiple Connections
If a task has more than one upstream connection, the task remains in a Waiting status until all of the conditions of those multiple connections are evaluated. If all of the connections are with paths that have been skipped, the task goes to a Skipped status. If at least one of the connections is with a path that has executed and all connections have been evaluated, the task executes.
Moving Workflow Elements
Once you have positioned one or more tasks and connections on the workflow canvas, you can reposition the objects as needed.
To move a single task:
- Click the Select
icon to enter Select mode.
- Click on a task and drag it to its new location. If the task has any connectors attached, they remain connected and lengthen or shorten as necessary.
Or,
- Click one of the Connect
icons to enter Connect mode.
- Click on the end of the connection, near where it connects to the task you want to move.
- Drag the connection and task to their new location. The connector remains connected and shortens or lengthens as necessary.
To move a group of tasks:
- Click the Select
icon to enter Select mode.
- Position the cursor near the group you want to select.
- Click on the canvas and begin dragging. A blue shaded box appears. This identifies the selection area.
- Drag the selection area over the tasks you want to select, as shown in the following example:
- When you have selected all the tasks you want to move, release the mouse. The tasks and connectors included in the group are highlighted, as shown:
- Click on one of the selected tasks and drag it to the new location. All the selected tasks are moved.
- To deselect the group of tasks, click elsewhere on the canvas.
Or,
- Click one of the Connect
icons to enter Connect mode.
- Position the cursor near the group you want to select.
- Click on the canvas and begin dragging. A blue shaded box appears. This identifies the selection area.
- Drag the selection area over the tasks and connectors you want to select. Make sure you select the entire connector(s), or you will not be able to move the objects.
- When you have selected all the tasks and connectors you want to move, release the mouse. The tasks and connectors included in the group are highlighted.
- Click on one of the selected connectors and drag it to the new location. All the selected tasks and connectors are moved.
- To deselect the group of tasks and connectors, click elsewhere on the canvas.
Deleting Workflow Elements
- Highlight the workflow element you want to delete. Or, select a group of elements you want to delete.
- Click the Delete
icon. The element an all its associated connectors are deleted.
Copying Workflow Elements
- Highlight the workflow element you want to copy. Or, select a group of elements you want to copy.
- Click the Copy
icon. The element and all its associated connectors are copied.
- To paste the copied elements onto the workflow, click Paste
. The copied elements are pasted next to the originals.
- To move the new elements to a new location, go into Connect mode and click and drag one of the connectors or go into Select mode and click and drag one of the icons. If you have copied multiple elements, do not click elsewhere in the display before dragging the group. Clicking elsewhere deselects the copied elements.
Undoing and Redoing Workflow Changes
To undo the most recent change, click Undo
. To redo a change you just undid, click Redo
Zooming In and Out
Several features are available for zooming in and out on large workflows:
- Click Fit
to fit the entire workflow onto the display.
- Click Zoom In
to increase the size of the workflow (to view details).
- Click Zoom Out
to decrease the size of the workflow (to view the entire workflow)
- Click Actual Size
to return the workflow to its actual (original) size.
- Click Zoom
to enter a zoom percentage.
Panning Around in Large Workflows
For large workflows that cannot all be displayed on the screen, you can pan around from area to area. Two methods are provided: the Pan
icon and the Outline
icon.
- Click the Pan
icon. This enters Pan mode.
- Click the display and drag the workflow so that it displays the area you want to work on.
Or,
- Click the Outline
icon. The Outline window opens.
- In the Outline window, move and/or resize the blue box to identify the area of the workflow you want to work on. The display repositions itself as indicated in the Outline window.
Automatically Formatting a Workflow
You can apply automatic formatting to your workflow. This process does not change any connections or content, but reorganizes the workflow into a more legible display.
Displaying Workflow Documentation
Displaying Processing Messages
While a workflow is running, you can click the Console
icon to display processing messages. For more details, see Monitoring Workflows.
Saving the Workflow
Switching Between Workflows
You can switch between workflows without using the navigation pane by clicking the Open Workflow
icon and selecting the workflow you want to switch to. It is recommended, but not required, that you save your work before switching to another workflow. You can switch back to your original workflow by clicking Open Workflow again.
Adding Skip/Run Criteria for Specific Tasks
You can add special instructions that specify conditions under which a specific task within the workflow should run or skipped. The system evaluates these instructions when determining whether to run each task within a workflow. For example, you might want to skip a specific task in a workflow on a certain day or date or you might want to run a specific task only if a certain variable is set to a specific value.
Creating New Run Criteria
- Display the workflow for which you want to specify run criteria.
- Click the Task Run Criteria tab. This list displays a list of specified task run criteria.
- From the Task Run Criteria list, select New. OpsWise Automation Center displays the Task Run Criteria screen:
- Using the field descriptions provided below as a guide, complete the fields as needed. For example, to tell the system not to run a specific task on business days or holidays, select Skip Criteria in the Type field, select the task and enable Business Day and Holiday.
- Click the Submit button to save the record and return to the menu, or, right-click the title bar and select Save to save the record and remain on the current display.
- If appropriate, repeat these steps for any additional run criteria you want to add.
Task Run Criteria Field Descriptions
| Field Name | Description | |
|---|---|---|
| Type | User-defined. Indicates whether this is providing instructions on when to run or not run the workflow. Options:
|
|
| Task | User-defined. Select the task for which you are specifying run or skip criteria. Click on the magnifying glass to browse for and select a task from the task list. | |
| Vertex ID | Each task within a workflow has a unique vertex ID, which distinguishes it from other tasks of the same name, if any. | |
| Business Day | If enabled, the task runs or skips on all business days. | |
| Calendar | User-defined. Defines Business Days or holidays, if selected. Type in a calendar name or click the magnifying glass to browse for an existing calendar or to add a new calendar. To display details about the calendar specified in this field, hover over the paper icon. | |
| Holiday | If enabled, the task runs or skips on holidays. | |
| Specific Day(s) -- Sunday through Saturday | If enabled, the task runs or skips on the day(s) you select in the right-hand column. | |
| Custom Day | If enabled, the task runs or skips on the day you select in the Custom Day Choice field. | |
| Custom Day Choice | If Custom Day is enabled, select the custom day for which you are specifying run or skip criteria. Click on the magnifying glass to browse for and select a day from the custom day list. | |
| Complex | If Custom Day is enabled, select the custom day for which you are specifying run or skip criteria. Click on the magnifying glass to browse for and select a day from the custom day list. | |
| Adjective | If Complex is enabled, you can use this field to specify which in a series of days you want to select. Used in conjunction with the Noun and the Qualifier fields. For example, to specify "the 1st business day of the month," select Adjective: 1st, Noun: Business Day, Qualifier: Month. Options:
|
|
| Noun | If Complex is enabled, , you can use this field to specify the type of day you want to select. Used in conjunction with the Adjective and the Qualifier fields. For example, to specify "the 1st business day of the month," select Adjective: 1st, Noun: Business Day, Qualifier: Month.
This drop-down menu is populated as follows:
|
|
| Qualifier | If Complex is enabled, , you can use this field to specify the period for your selection formula. Used in conjunction with the Noun and the Adjective fields. For example, to specify "the 1st business day of the month," select Adjective: 1st, Noun: Business Day, Qualifier: Month. Options:
|
|
| Variable | If enabled, instructs the system to run or not run the task, depending on the value of a specific variable. Used in conjunction with fields: Evaluate At, Name, Operator, and Value (see below). | |
| Evaluate At | Allows you to specify when you want the system to evaluate the variable. Options:
|
|
| Name | Specifies the name of the variable being evaluated. The variable does not need to exist when this record is created. | |
| Operator | Allows you to select the operator to be used in the evaluation. Options: =, !=, >, >=, <, <=, regex (regular expression). | |
| Value | Allows you to specify the value or regular expression the system should look for when evaluating the variable. Up to 40 alphanumerics. | |
| Submit button | Submits the new record to the database. | |
| Update button | Saves updates to the record. | |
| Delete button | Deletes the current record. | |
| Variables tab | Displays all variables associated with this trigger. | |
Modifying an Existing Workflow
- Click Workflow Tasks from the Navigation Pane. The Workflow Tasks list displays.
- Locate the workflow you want to modify and click on the Task Name (or other identifier in the leftmost column).
- Click Edit Workflow. The Workflow Editor opens.
- Make your changes and click the Save
icon.
Deleting a Workflow
- Click Workflow Tasks from the Navigation Pane. The Workflow Tasks list displays.
- Locate the workflow or workflows you want to delete.
- Click on the box associated with those records and select Delete from the Actions on selected rows... menu.
- To delete all workflow records, click on the box next to the Actions on selected rows... menu and select Delete.
Specifying When a Workflow Runs
You can run the workflow manually or specify triggers that run the workflow task automatically based on times or events.
Monitoring Workflow Execution
You can monitor all system activity from the Activity screen.









