Working with Activities

Adding Activities

To define a new activity, follow these steps:
  1. Start SAS Workflow Studio and either open a saved process, download a process from the content repository, or create a new process.
  2. In the toolbar, select the Add Activity icon (Add Activity icon).
  3. Click anywhere on the drawing panel to create an activity.
  4. Move the activity to the desired position on the drawing panel by clicking the selection tool (Selection tool button) on the toolbar, selecting the desired activity, and dragging it to the new location.
The default name of the first activity is Activity0. The second activity is named Activity1, and so on.

Connecting Activities in a Sequential Flow

To define a logical sequence of activities, you connect them in the desired order. You can also assign a status. See Working with Statuses for details.
To link two activities together, follow these steps:
  1. Select the Add Sequence Flow icon (sequence flow button) from the toolbar.
    The cursor changes to a large plus sign (cursor) and a four-sequence flow anchor blinks when the cursor is in the proper position to make the connection.
    Flow Anchors for an Activity
    Flow Anchors for an Activity
  2. In the drawing panel, drag the mouse pointer from the first activity figure toward the second activity figure.
    A line and arrow show the direction of the link, indicating the sequence of the process logic.
For example, a process might contain activities A1, A2, and A3. Activity A1 executes first, followed by A2 upon completion of A1, and so on, until A3 completes to terminate the process. Such a process could be modeled as follows:
Sequential Process Flow
Sequential Process Flow

Editing Activities

To edit an activity, follow these steps:
  1. Open the Edit Activity dialog box by double-clicking the activity.
    Alternatively, right-click on the activity in either the diagram or the process tree and select the Edit option.
  2. Enter the desired name in the Activity Name field.
  3. (Optional) Add a description for the activity in the Description field.
  4. (Optional) Enable the desired notifications, which are generated using the SAS Notification Service.
  5. (Optional) Add localized versions of the name and description.
    For more information, see Text Localization.
  6. (Optional) Add custom attributes.
    For more information, see Custom Attributes.
  7. Click OK to save the updated activity definition.

Deleting Activities

To delete an activity, follow these steps:
  1. Right-click on the activity in either the drawing panel or process tree and select the Delete option.
    Alternatively, select the activity in the drawing panel or process tree and press the Delete key or CTRL+X.
  2. Select Yes in the confirmation dialog box to permanently remove the selected activity.
The deleted activity is no longer visible in the drawing panel or the process tree.
Tip
To delete multiple activities and the links among them, drag a selection box around the desired elements (or use the Shift-click selection technique) and then press the Delete key.
Note: All locally defined data objects, statuses, participants, and policies are also deleted when the containing parent activity is deleted. If you attempt to delete a global element that is referenced elsewhere in the process, then you are notified that it should not be deleted until all references are removed.
Note: SAS Workflow Studio does not currently support the undo or CTRL+Z operation.

Adding a Subprocess

Processes contain one or more tasks that each represent a step or unit of work in the workflow structure. Grouping elements together into a process can also help organize and reuse business logic. A subprocess is a process contained within a parent process that can be used to refactor a larger process into smaller components. Using subprocesses improves readability of the workflow definition and promotes consistent reuse of process logic within the organization.
To create a subprocess, follow these steps:
  1. In the drawing panel, right-click on the activity that you want to convert to a subprocess and then select Create Subprocess.
  2. When prompted, select one of the following options:
    • Create New
    • Load from file
    • Open from workflow repository
  3. Select OK to save the subprocess definition.
For each option, the relevant diagram opens. For the Create New selection, the diagram is blank and untitled. For the other options, the diagram is a copy of the designated existing template.
The original parent process elements remain visible in the process tree.
After an element is added to the new diagram, the relevant activity becomes denoted as a process (process icon) in the process tree. The subprocess data objects, statuses, policies, and participants are also visible in the process tree hierarchy.
After adding a subprocess, the activity symbol in the parent process becomes a stacked icon representing a set of activities rather than a single step in the process. The following figure shows an example of subprocess notation:
Subprocess Symbol
Subprocess Symbol

Aligning Activities

Multiple activities can be aligned using the alignment tool.
To activate the alignment tool, follow these steps:
  1. Hold down the Ctrl key and click the mouse. A blue plus sign (plus sign cursor) appears on the drawing pane.
  2. Drag the cursor (plus sign) vertically or horizontally to form an alignment bar.
    Example showing alignment bar
You can toggle among the following alignment modes by pressing the space bar:
  1. Space evenly
  2. Pack tightly
  3. Spread out
  4. Original