Automation Center Documentation

Creating a Simple Workflow

From OpsWise Documentation Wiki

image:pdficon_small.gif Open as PDF

In this exercise, we will learn how to copy tasks, create a simple workflow of Sleep tasks, and use the tools available in the workflow editor.

Contents

Copying Tasks

Before you begin, create six Sleep tasks for use in the workflow. Assign the names Sleep1, Sleep2, and so on, and give each task a sleep time of 10 (seconds). Hint: You can make a copy of a task with a new name as follows:

  1. Create the first task and use the down-arrow to save it.
  2. Type a new name (for example, Sleep2), click the down-arrow and select Insert and Stay.
  3. image:tut copying a task.jpg

  4. Repeat step 2 for the remaining Sleep tasks.

Creating a Simple Workflow

Now that we have six Sleep tasks to work with, we are ready to create a simple workflow:

  1. From the navigation pane, select Tasks > Workflow Tasks and click New.
  2. In the Task Name field, type Simple Workflow.
  3. Use the down-arrow to save the record without exiting the screen. Once the record is saved, note the additional buttons that have appeared: Update, Edit Workflow, Launch Task, and Delete.
  4. Click Edit Workflow to access the workflow editor.
  5. The workflow editor operates in several modes, depending on which icon was most recently clicked on the toolbar. See Workflow Modes for a complete description. Also, see the icon reference for a description of each icon on the toolbar. To add a new task, click the Add Task image:ops search.gif icon.
    1. When the Task Find window pops up, click the Search button to display all tasks. You can also narrow down the search by typing names or partial names in the Task name field or selecting specific task types, or both.
    2. image:tut task find.jpg

    3. Click and drag the icon onto the canvas for the Sleep1 task. Repeat the process for the remaining Sleep tasks. When you are finished, close the Task Find window.
  6. Now we will arrange our workflow as follows:
    • Sleep1 is the top-level task
    • Sleep 2, 3 and 4 are dependent on Sleep1.
    • Sleep 5 and 6 are dependent on Sleep 3.
    To create these connections:
    1. Click and drag Sleep1 to the top of the canvas and place Sleep 2, 3, and 4 in a line beneath it.
    2. Move Sleep 5 and 6 beneath Sleep3.
    3. image:tut sleep tasks.jpg

  7. Now we are ready to create connections.
    1. Click the curved connector icon image:ops connect.gif. This puts you in connect mode.
    2. Click Sleep1, drag the cursor down to Sleep2, then release the mouse. A curved connection appears.
    3. Repeat for Sleep3 and Sleep4.
    4. For the next set of connections, we will use the straight image:ops straight.gifconnector, which creates a diagonal line instead of a curved line. Click the straightimage:ops straight.gif connector, then click Sleep3 and connect it to Sleep5 and Sleep6. Your canvas should now look like this:
    5. image:tut sleep tasks with connectors.jpg

  8. The default conditions (or dependency) for connectors is Success. That is, the downstream task runs if the upstream task goes to success. To view the conditions, right-click on a connector and click Conditions. The Conditions window displays.
  9. image:tut conditions window.jpg
    Note that a Sleep task cannot go to Failure so those options are greyed out.

  10. Cancel out of the Conditions window and click Save image:ops save.gif to save the workflow.

Using the Workflow Editor Tools

  • Delete Sleep4 by clicking on it and clicking Delete image:ops delete icon.gif. Note that the connector is also deleted.
  • Increase the size of the workflow items by clicking Zoom In image:ops zoomin.gif.
  • Decrease the size by clicking Zoom Out image:ops zoomout.gif.
  • To change the workflow display to twice its size, click Zoom image:ops zoom.gif and specify 200.
  • To return it to its original size, click Actual Size image:zoomactual.gifx.gif.
  • To reformat your entire workflow into a horizonal display, click Horizontal Layout image:ops tree_layout_horizontal.gif.
  • To reformat the workflow into a vertical display, click Vertical Layout image:ops tree_layout_vertical.gif.
  • Two tools are available for viewing very large workflows:
    • To reposition the workflow so you can view a specific section, click Pan image:ops pan.gif, click anywhere in the canvas and drag.
    • Click Outline image:ops outline.gif. In the Outline window, reposition the blue box around the area you want to display.

See Icon Reference for a complete description of all workflow editor tools.

Running the Workflow

Now we will manually launch the workflow and view it from the Activity screen.

  1. Click the back arrow to return to the Workflow record.
  2. Click Launch Task.
  3. From the navigation pane, select Task Instances > Activity. You will see six task instances: the Simple Workflow task, and the five Sleep tasks (assuming you deleted one of the Sleep tasks during the previous exercise).

image:sb15-1.gif


Return to First Look menu.

For additional information, see:

Personal tools