Diagram View: General Information

In addition to using the Workflow (Tree View) page, you can use the Workflow (Diagram View) page (also referred to as the Workflow Visual Editor) to work with a particular workflow. The diagram view is structured like a traditional workflow, with visual representations of the states of the record and the transitions between them. To access the diagram view, while you are working with the tree view of the particular inherited, custom, or predefined workflow on the page, you click Diagram View on the page toolbar.

Tip: For a workflow with composite states, the diagram view is not available—that is, the Diagram View button is not displayed on the More menu of the Workflow (Tree View) page.

Learning Objectives

In this chapter, you will learn about the use of the Workflow (Diagram View) to customize workflows.

Applicable Scenarios

You use the Workflow (Diagram View) page to create or modify workflows if you prefer to use a visual representation of a workflow instead of its tree view.

Working with the Diagram View

The diagram view of the Workflows page contains the following parts, as you can see in the screenshot below:

  • The page toolbar and More menu with various buttons and commands.
  • The main area, which displays the workflow of the selected form as a diagram and has the following elements:
    • Boxes that contain the names of the states of the record created by using the form and labels with the names of the actions or event handlers that trigger the transitions. The labels appear after you create a transition and specify the source and target states. For example, in the screenshot below, the New box reflects the New state (which is the status on the form) for a case, and the labels within the New box (such as Open and Pending Customer) reflect the actions a user can perform while the case has the New state.
      Note: Actions and event handlers for the current state are not displayed if they do not trigger any transitions.
    • Arrows that show the transitions between the states. For example, Item 1 in the following screenshot shows an arrow that represents a transition from the Open state to the Pending Customer state of a case that has been created on the Cases (CR306000) form.
  • Buttons that are shown to the right of the diagram: Zoom In or Zoom Out (Item 2), Reset Scale to 100% (Item 3), Fit Screen (Item 4), and Collapse All/Expand All (Item 5).
    Figure 1. The parts of the diagram view


In the diagram view of the Workflow page, a box with a state contains the following elements:

  • Arrow: You click an arrow (see Item 6 in the screenshot above) to expand or collapse the list of actions or event handlers that trigger transitions for this state.
  • More button: You click the More button in the upper-right corner of the box (Item 7) to open the More menu, which has the following commands:
    • Edit State: Opens the State dialog box, which you can use to modify the state.
    • Add Transition: Opens the Add Transition dialog box, which you can use to add a transition from the current state to another state. In the dialog box, you specify the target state and the action or event handler that causes the transition to the state.
    • Delete State: Deletes the state. When you select this command, you need to confirm the deletion in the dialog box that is opened.
  • Plus button: You click a plus button (Item 8) to manually draw a transition line for an action or an event handler that does not yet have any outgoing transitions from the current state. This opens the Add Transition dialog box with the Target State box filled in.

    When the transition is created, the action or event handler that triggers it is added to the box with the current state. This action or event handler has the name you have specified in the Trigger Name box of the dialog box.

Notice in the screenshot that the page name is CR306000 (Cases) State Diagram: Default Workflow. The form number and its name (in parentheses) precede State Diagram, which is followed by a colon and the workflow name of the predefined workflow (Default Workflow in this case).

Tip: For a particular workflow, the tree view and diagram view of this page have the same page name.

Specifying Transitions

In the diagram view of a workflow, you add transitions from one state to another by drawing lines between these states. If an action that triggers the transition already exists, you select it in the Transition Properties dialog box. If the action does not exist yet, you create it by clicking Create in this dialog box.

To add a transition from one state to another, you need to draw a line between these states. To draw a line, in the box with the initial state, you click and hold the plus button.

If a transition has a condition (that is, if the transition is performed only when a particular condition is met for the record), a diamond icon is displayed above the transition (see Item 1 in the following screenshot).

If an action with a transition contains an auto-run condition (that is, a condition for which the action is triggered automatically if the condition is met), a lightning rod icon is displayed above the transition (Item 2).

The transition lines are of the same color as the states they originate from, which makes it easier to distinguish between transitions. Also, each transition has a dot that is of the same color as the target state of this transition (Item 3).

Figure 2. Parts of the transitions