Using the Diagram Editor

Elements of a Workflow

Overview

Using SAS Workflow Studio's diagram editor, the business analyst can graphically design the relevant collection of tasks that comprise the workflow. Each workflow is a group of elements assembled using the following object model:
  • tasks
  • data objects
  • policies
  • statuses
  • participants

Tasks

A task is a step or unit of work in the workflow. Tasks can be atomic nodes (tasks) or can contain collections of related nodes (local subflows). In the workflow tree, tasks are represented by a task icon (Task icon). The root workflow and its subflows are represented by a process icon (process icon).
A task can be manual, or it can be automated by a script or a policy.

Data Objects

Data objects represent the business data values required to perform the workflow tasks. Data objects can mirror values retrieved from external data systems. In this way, SAS Workflow Studio is only loosely coupled with external data systems.
Data objects can be defined at the root workflow level or at the local task level. Data objects defined at the workflow level are global data objects. Global data objects can be accessed by all tasks and policies within the workflow.
Data objects defined at the task level are local data objects. They are accessible only for use by the parent task and its children.
Also, general workflow data and logic should be separated from actionable business data and logic. Workflows embody the abstract data and logic. Data objects embody the relevant portions of business data required to drive path execution and policies represent specific business actions.

Policies

A policy is a workflow element that associates event-driven logic with a task or subflow. Policies are usually triggered automatically by an event such as a status change or a timer event. A policy can reference workflow data to add, change, or update peer workflows at run time. These events occur when there is a change in the workflow. Events can be triggered in either of the following cases:
  • a change is generated in the state or status of the task or subflow that was triggered by using a timer for single or repeated actions
  • a signal that was received from an external system
Policies support workflow automation in an extremely flexible manner. They are customizable using properties defined for each action.

Statuses

A status is the outcome of a task. Status values are used to trigger state changes in tasks and subflows and to trigger the execution of policies. The status of a task is typically used to trigger the next task. Status values are part of the data that policies use to execute automated tasks. Status values have descriptive names such as Done, Cancel, and Accept to illustrate changes that occur in the workflow. Statuses link the workflow logic and solution logic because they represent transition states between tasks and other workflow elements.

Participants

A participant is a resource that performs the work represented by a workflow task instance. This work is typically manifested as one or more work items assigned to the workflow participant via the tasks in a workflow. (The tasks assigned to a participant are sometimes referred to as the participant’s worklist.) The list of solution users, groups, roles, or privileges (that is, platform identities) are mapped to standard roles in workflows as a participant. The participant is the actual mapping between the platform or solution user, group, role, or privilege (identity) and the workflow role. Participants drive task access and authorization by linking the workflow authorization roles to the SAS platform users, groups, organizational roles, and privileges.

Workflow Diagram Elements

Global data objects, policies, statuses, and participants are associated with the top-level folders under the workflow root task. Child tasks can also contain locally defined data objects, policies, statuses, and participants. Local elements that exist in the context of a specific task are accessible only at the task level, not by the peer tasks or gateways. In addition, the global elements are not re-created as local values associated with the child elements. Therefore, refer to solution-specific best practices to specify data object scope at design time.
Each template begins with a Start node and contains one or more work items (tasks or subflows) before terminating with at least one Stop node. Each new diagram includes a Start and Stop node, but a single Stop node might terminate multiple tasks. Likewise, the Start node can be used to initiate multiple tasks.
The following elements can be used in a workflow diagram:
start node diagram element
The Start node must precede the first task in the template unless a timer is used to offset the start of the instance.
stop node diagram element
The Stop node must be connected to any task that leads to instance termination.
task diagram element
Tasks are individual work items in the workflow. They can represent automated or manual work items.
subflow diagram element
A task element with a stacked appearance represents a subflow. A subflow contains one or more tasks that might then represent subflows resulting in a workflow hierarchy. You can create subflows and edit the contained tasks from the drawing editor.
swimlane diagram element
Swimlane elements are used in SAS Workflow Studio to group tasks assigned to the same participant. They can be explicitly assigned to a Participant object, or they can be implicitly assigned via a swimlane policy. The swimlane policy might be a dynamic reference to a data object. If so, then the user, group, role, or privilege value defined by the specified data object is derived at run time.
sequence flow icon
The Sequence Flow tool is used to connect workflow elements.
Example sequence flow with assigned status of “Done”
This connection element might also be used to designate workflow status (that is, state changes or transitions between tasks).
Example annotation box
Annotations are used to hold additional information. These notes are for presentation only and are not associated with a running workflow instance.
You can use the drawing tools in the toolbar to place tasks on the diagram editor and connect them using the Sequence Flow element. You can also select and right-click any task or connection on the diagram editor to add objects. Alternatively, you might use the workflow tree context menus to add tasks and other workflow elements.
Last updated: March 5, 2020