Working with Statuses

Overview

Statuses are used to denote the outcome of a process step as values associated with a logical transition from one activity to another. These values appear as labels on the flow connections and they represent the condition, which must be met in order to realize the transition.
By default, when no status is added, the task completes and the subsequent task is automatically started. This default value is represented as the (FINISHED) state in the status assignment menu, but does not explicitly appear on the transition as a label. Predefined values are Cancel, Done, Okay, Overdue, and Scheduled. You can also define custom status values.
If a status is specified on the connection, then the process advances to the next activity in the sequence only when that status changes to the associated value causing the current activity to complete.
For example, the process contains two activities, A and B, with a connection from Activity A to Activity B. If Activity B is initiated after Activity A has been approved, then we can represent it by assigning an Approve status to the connection between Activity A and Activity B, as shown in the following figure:
Status Example
Status Example

Adding Statuses

To define a new status, follow these steps:
  1. In the process tree, right-click on the Statuses folder and select New Status.
    Alternatively, right-click on an activity in the diagram editor and select the New Status option.
  2. In the New Status dialog box, enter a name for the status in the Status Name field.
  3. (Optional) Add a description for the status in the Description field.
  4. (Optional) Add localized versions of the name and description.
    For more information, see Text Localization.
  5. (Optional) Add custom attributes.
    For more information, see Custom Attributes.
  6. Choose the scope of the value using the Visible in entire subtree check box. This makes this status definition accessible to other activities in this process.
  7. Click OK to save the new status definition.

Editing Statuses

To edit an existing status definition, follow these steps:
  1. In the process tree, open the Statuses folder and then right-click on the desired status node.
  2. Select Edit.
  3. Change the desired values in the Edit Status dialog box.
  4. Select OK to save the updated status definition.

Deleting a Status

To completely remove a status value from the workflow, follow these steps:
  1. Right-click on the status in the process tree and then select Delete.
    Alternatively, you can select the status directly in the process tree and press the Delete key or CTRL+X.
  2. Select Yes in the confirmation dialog box to permanently remove the selected status.

Assigning a Status

To assign a status, right-click on a connection between activities and then select Change status. This opens a menu containing the status values defined for the workflow. If the desired status is not defined, then you can select the New status menu option to define the new status value.
The Change status menu does not appear on the pop-up menu for the connection between the Start node and the first activity. However, a status value can be assigned to a connection to the Stop node, as shown in the following figure:
Process with status of “success” assigned to the stop node
Tip
You can use the Selection tool (selection icon) to reposition the activity figures in the diagram editor to ensure that the statuses are visible. Also, you can reposition the connection endpoints by selecting the target connection. Then, select the endpoint and drag it to the new location in the figure by releasing the mouse.
If the termination node is within a local subprocess, transitions with this status are executed.
This means status propagation is triggered in the parent process via the termination node with status.
If the subprocess is executed more than once (within a loop, for example), it is recommended that the connection be joined into a single activity before terminating.

Local Statuses

When you define a status locally for an activity, not for the whole process, SAS Workflow Studio displays the relative label path. A label path is an alternative way to refer to an object when using the object ID is not feasible. A label path contains a sequence of strings. Each string is the label of a parent or ancestor of the object except for the last label, which corresponds to the object itself.
The following example shows the global statuses Done and Cancel, which are defined for the Approval process. The Review Order activity includes the statuses Approve and Reject, and their label paths include the object's ancestors.
Local Status Values
Local Status Values