Manage and Model Processes
ProcessMaker API Documentation
Script Central

Connect Sequence Flow Elements to Indicate Workflow Routing

Indicate the order of workflow routing in your Process model by connecting elements Sequence Flow elements.

Overview

Use a Sequence Flow element to indicate workflow routing between the connected elements. The direction in which the Sequence Flow points implies how Request data is conveyed and utilized in the Process model. As a best practice, indicate a consistent direction of Sequence Flow elements: either left to right or top to bottom, to make Process models easier to understand.

Sequence Flow elements are not to be confused with Message Flow elements.

Sequence Flow elements have the following attributes in regards to specific Process model elements:

  • From the context of a Process model element associated with a Sequence Flow element, that Sequence Flow element can be "incoming" or "outgoing." Consider the following Process model example to demonstrate their differences.

    • Incoming: An incoming Sequence Flow element comes from its connecting element. In the example, the Sequence Flow element is incoming to the New Task element.

    • Outgoing: An outgoing Sequence Flow goes to the connecting element. In the example, the Sequence Flow element is outgoing from the New Task element.

  • Text annotation elements and Pool elements do not participate in sequence flow.

  • Sequence Flow elements cannot connect workflow between Process model elements within different Pool elements. Use Message Flow elements to infer communication between elements in different Pool elements.

  • A Start Event element begins the flow of a Request for that Process. Therefore, a Start Event cannot have an incoming Sequence Flow element.

  • An End Event element terminates the flow of a Request for that Process. Therefore, an End Event cannot have an outgoing Sequence Flow element.

  • Sequence Flow elements from Exclusive Gateway and Inclusive Gateway elements can be configured to specify under which condition a Request routes through that Sequence Flow element. See Configure an Outgoing Sequence Flow Element from an Exclusive Gateway or Inclusive Gateway Element.

Connect the Sequence Flow Element to Another Element

Looking for Information about Message Flow Elements?

See Set and Delete Message Flow Between Elements.

Permissions Required

Your ProcessMaker user account or group membership must have the following permissions to set Sequence Flow elements in the Process model unless your user account has the Make this user a Super Admin setting selected:

  • Processes: Edit Processes

  • Processes: View Processes

See the Process permissions or ask your ProcessMaker Administrator for assistance.

Follow these steps to set the Sequence Flow element from one connecting element to another:

  1. ​View your Processes. The Processes page displays.

  2. Click the Open Modeler iconto edit the selected Process model. Process Modeler displays.

  3. Select the Process model element from which you want to set the workflow routing. Available options display to the right of the selected element. The solid-line Flow indicator is for Sequence Flows (highlighted below).

  4. Click the Sequence Flow icon.

  5. Click the Process model element in which to set the workflow routing. The Sequence Flow element connects between the two (2) elements to indicate workflow routing.

Settings

Your ProcessMaker user account or group membership must have the following permissions to configure Sequence Flows in the Process model unless your user account has the Make this user a Super Admin setting selected:

  • Processes: Edit Processes

  • Processes: View Processes

See the Process permissions or ask your ProcessMaker Administrator for assistance.

The Sequence Flow element has the following panels that contain settings:

Configuration Panel Settings

Edit the Element Name

An element name is a human-readable reference for a Process element. Process Modeler automatically assigns the name of a Process element with its element type. However, an element's name can be changed.

Follow these steps to edit the name for a Sequence Flow element:

  1. Ensure that the Hide Menus buttonis not enabled. See Maximize the Process Modeler Canvas View.

  2. Select the Sequence Flow element from the Process model in which to edit its name. Panels to configure this element display.

  3. Expand the Configuration panel if it is not presently expanded. The Name setting displays.

  4. In the Name setting, edit the selected element's name and then press Enter.

Edit the Expression to Indicate Workflow Routing

This Sequence Flow element setting is available only for Exclusive Gateway and Inclusive Gateway elements. See Configure an Outgoing Sequence Flow Element from an Exclusive Gateway or Inclusive Gateway Element for information how this setting affects workflow routing.

Outgoing Sequence Flow elements from Exclusive Gateway and Inclusive Gateway elements have an additional setting from which to dictate under which condition(s) that Sequence Flow element triggers to route a Request's workflow to its connecting element during a Request.

Follow these steps to edit the expression that dictates under which condition(s) that Sequence Flow element triggers to route a Request's workflow to its connecting element:

  1. Ensure that the Hide Menus buttonis not enabled. See Maximize the Process Modeler Canvas View.

  2. Select the outgoing Sequence Flow element from the Exclusive Gateway or Inclusive Gateway element from which dictate conditions under which workflow routes through that Sequence Flow element. Panels to configure this element display.

  3. Expand the Configuration panel if it is not presently expanded. The Expression setting displays.

  4. In the Expression setting, enter the expression that dictates under which condition(s) that Sequence Flow element triggers to route a Request's workflow to its connecting element, and then press Enter. See the following sections for more information:

Advanced Panel Settings

Edit the Element's Identifier Value

Process Modeler automatically assigns a unique value to each Process element added to a Process model. However, an element's identifier value can be changed if it is unique to all other elements in the Process model, including the Process model's identifier value.

All identifier values for all elements in the Process model must be unique.

Follow these steps to edit the identifier value for a Sequence Flow element:

  1. Ensure that the Hide Menus buttonis not enabled. See Maximize the Process Modeler Canvas View.

  2. Select the Sequence Flow element from the Process model in which to edit its name. Panels to configure this element display.

  3. Expand the Advanced panel if it is not presently expanded. The Node Identifier setting displays.

  4. In the Node Identifier setting, edit the Sequence Flow element's identifier to a unique value from all elements in the Process model and then press Enter.

Configure an Outgoing Sequence Flow Element from an Exclusive Gateway or Inclusive Gateway Element

Outgoing Sequence Flow elements from Exclusive Gateway and Inclusive Gateway elements have the following settings as do other Sequence Flow elements:

Outgoing Sequence Flow elements from Exclusive Gateway and Inclusive Gateway elements have an additional setting to indicate under which condition(s) a Sequence Flow element triggers to route a Request's workflow to its connecting element. If the condition(s) set for that Sequence Flow element are met, then that element triggers. ProcessMaker evaluates a Sequence Flow element's condition(s) to trigger by reviewing the Request's data to an expression that describes the condition(s). Specify this condition using an expression syntax described in Expression Syntax Components. Each Sequence Flow element can only have one expression, but by using logical operators multiple conditions can be specified in that expression. You may use Magic Variables in your expressions.

See Edit the Expression to Indicate Workflow Routing for information how to edit an expression in an outgoing Sequence Flow element from an Exclusive Gateway or Inclusive Gateway element.

ProcessMaker evaluates the condition(s) set for each outgoing Sequence Flow element from an Exclusive Gateway or Inclusive Gateway element using the following protocol:

  • The Sequence Flow element does not have an expression: If an outgoing Sequence Flow element does not have an expression, there are no conditions to evaluate; therefore, that Sequence Flow element always triggers. ProcessMaker routes workflow in the following way:

    • Outgoing Sequence Flow elements for Exclusive Gateway elements: If all outgoing Sequence Flow elements have no expressions from which to evaluate conditions, all Sequence Flow elements would trigger. However, Exclusive Gateway elements allow only one Sequence Flow element to trigger, so ProcessMaker triggers the top-most or left-most Sequence Flow element. In the example below, if neither Sequence Flow element has an expression to indicate routing conditions, then workflow routes to the "Task 1" element.

      Likewise, in the example below, if neither Sequence Flow element has an expression to indicate routing conditions, then workflow routes to the "Task 3" element.

      Note that Exclusive Gateway elements are designed to use expressions to evaluate Request data and thereby determine workflow routing. Therefore, not using expressions in outgoing Sequence Flow elements for Exclusive Gateway elements is not a best practice.

    • Outgoing Sequence Flow elements for Inclusive Gateway elements: Workflow always routes through that Sequence Flow element because conditions are always met. Inclusive Gateway elements allow as many Sequence Flow elements to trigger in which their conditions are met.

  • The Sequence Flow element has an expression: The condition(s) in the Request data evaluate to determine if the condition(s) set in that Sequence Flow element is met. If so, that element triggers to route workflow from that outgoing Sequence Flow element to its connecting element. If not, then that Sequence Flow element does not trigger and workflow does not route through that element. ProcessMaker routes workflow in the following way:

    • Outgoing Sequence Flow elements for Exclusive Gateway elements: Exclusive Gateway elements allow only one Sequence Flow to trigger.

    • Outgoing Sequence Flow elements for Inclusive Gateway elements: Inclusive Gateway elements allow as many Sequence Flow elements to trigger in which their conditions are met. Therefore, all Sequence Flow elements in which their conditions are met trigger, thereby causing multiple workflow routes simultaneously for the same Request that stem from the Inclusive Gateway element.

When designing the condition(s) for outgoing Sequence Flow elements from an Exclusive Gateway element, ensure that the condition for one of its outgoing Sequence Flow elements can trigger. Otherwise, it may be possible that no outgoing Sequence Flow elements trigger to continue workflow, thereby causing a Request error.

Expression Syntax Components

Use the following expression syntax components to compose the expression that describes under which condition(s) an outgoing Sequence Flow element triggers.

Spaces are allowed before and after expression components, such as arithmetic and comparison operators, to more easily read the expression.

Combine expressions using logical operators. Example: (not approved) or (cost > 500).

Magic Variables can be used in when composing expressions.

Literals

Component

Syntax

Expression Example

string

"hello world" or 'hello world'

FullNameInput == "Louis Canera"

number

100

cost > 500

array

[value1, value2]

myFruit not in ["apples", "oranges"]

Boolean

true and false

directorSigned

Arithmetic Operations

Component

Syntax

addition

+

subtraction

-

multiplication

*

division

/

Logical Operators

Component

Syntax

not

not

and

and

or

or

Comparison Operators

Component

Syntax

equal to

==

not equal to

!=

less than

<

greater than

>

less than or equal to

<=

greater than or equal to

>=

String Operator

Component

Syntax

concatenate matches

~

Array Operators

Component

Syntax

contains

in

does not contain

not in

Range

Component

Syntax

Example

range

..

foo in 1..10

Related Topics