Creating and Starting a Workflow

Overview

The primary purpose of SAS Task Manager is to view workflow instances that have been initiated by another SAS application such as SAS Data Remediation or SAS Business Data Network. However, it is also possible to initiate a workflow instance directly from SAS Task Manager and interact with it. The following simple example shows how this can be done.

Creating a Workflow Template in SAS Workflow Studio

Using SAS Workflow Studio, you can create a workflow template that can be started from SAS Task Manager, can accept data values from the user, and can be transitioned to a Done state to complete the workflow.
Workflow Template
Workflow Template
To create the workflow template in SAS Workflow Studio:
  1. Create a new workflow template named Example.
  2. Create two tasks and define these tasks as Start and End.
  3. For each task, create a data object. For the Start task, name the data object MessageIn and for the End task, name the data object MessageOut. Use the short text data type for both data objects and add the following attributes:
    HIDE = 0
    WRITE = 1
    This enables these data objects be visible and editable in SAS Task Manager.
  4. To pass data values from one object to another, add a new Policy on the Start task that copies the data object value from MessageIn to MessageOut with the event type of Task Finished. This enables you to edit the data value first and have it passed over to another data object once the status has been modified.
  5. Add Data Management Stewards as a group participant on both the Start and End tasks.
  6. Add a Confirm status and set it for the transition between the Start and End tasks.
  7. Add a Done status and set it as the transition between the End task and the terminating task represented by Terminate Icon.
  8. Upload this workflow template to the SAS server. Log on to the SAS Server from the main menu and save this new workflow to the online repository, activating it before you complete the transaction.
You now have a workflow template that enables any user in the Data Management Stewards group to invoke it, start a workflow, add a message to it, and mark it complete. In a more elaborate scenario, this same design might include a new Invoke Web Service policy that takes the input from the data steward, passes it into the web service, and sends an e-mail confirmation to the data steward when the web service successfully completes.

Starting a Workflow in SAS Task Manager

If you are a member of the Data Management Stewards group, you can now log on to SAS Task Manager and start the workflow.
To start the workflow in SAS Task Manager:
  1. From the Actions menu, select New Task to open the New Task dialog box.
  2. In the New Task dialog box, select the Example template that you created and enter a name. Click OK.
  3. The workflow begins and a new workflow instance appears in the table of tasks. Confirm appears beneath the Task Details and Task Data tabs.
  4. Click the Task Data tab and enter text in to the MessageIn data field. Click Confirm.
    The workflow moves from the Start task to the End task shown in the main workflow queue. Done appears in the issue toolbar as well as the data that you entered into the MessageIn data object appearing in a new MessageOut data object.
  5. Click Done. This terminates the workflow because the next step in the workflow definition is the standard termination task.
You have learned how to create a new workflow with tasks, statuses, and data objects. You have added participants, connected to the workflow server, and uploaded a new workflow. Also, you have learned how these design decisions appear in SAS Task Manager. Much more elaborate workflows are possible and are common, but they all share the same basic building blocks and are represented in the same manner in SAS Task Manager.