Skip to content

Process Routes in Lowgile

Process routes define how a workflow moves from one step to another. A route is a named connection that represents an allowed transition between two steps in a BPMN diagram.

A user task can have multiple incoming and outgoing routes. Incoming routes define the paths by which the workflow can reach the task. When the task is completed, its output handler returns a route name, which Lowgile matches to an outgoing route to determine the next activity.

For instance, an approval task may have an approve route and a reject route, with each route leading to a different activity. Lowgile selects the outgoing route as follows:

  1. A user selects one of the available actions on the task screen.
  2. The screen calls an output and submits a value representing the selected action and its associated data.
  3. The user task’s output handler receives the submitted value through the data variable.
  4. The output handler evaluates data and returns the name of an outgoing route.
  5. Lowgile matches the returned name to an outgoing route and continues along that route.

Attention

The returned route name is case-sensitive and must exactly match the name assigned to an outgoing connection in the process diagram. If no matching route exists, the process cannot continue along the intended path.

The task screen calls its submit output and passes an object containing the user’s decision and accompanying comment:

output.submit({
isApproved: true,
comment: screen.comment
})

Lowgile passes the submitted object to the Approve PR user task’s output handler through the data variable. The handler evaluates data.isApproved and uses the result to return the corresponding route name:

return data.isApproved ? "approve" : "reject"

If data.isApproved is true, the handler returns approve; otherwise, it returns reject. Lowgile matches the returned name to the corresponding outgoing route and continues along that route.