Process Routes
Process routes define how a workflow moves from one step to another within a process.
A route is a named connection between two steps in the process diagram. At runtime, the process engine selects a route based on a value returned from a screen or action.
Where routes are defined
Section titled “Where routes are defined”Routes are defined in the process diagram as named connections between steps.
- Each connection represents a possible transition
- Each connection can be assigned a route name
- The route name is used at runtime to determine which path to follow
Route names
Section titled “Route names”Route names are string values used to match runtime outputs to process transitions.
- Must be unique among the routes leaving the same task
- Are case-sensitive
- Should be simple and descriptive (e.g.,
approve,reject,submit)
Why route names matter
Section titled “Why route names matter”Route names are referenced as string values returned from screens and actions.
As a result:
- Route names must match exactly for the workflow to continue
- Changing a route name in the process diagram requires updating any screens or actions that return this value
- Consistent naming improves the readability and maintainability of workflows
Runtime behaviour
Section titled “Runtime behaviour”At runtime, screens and actions return a value that must match a route name.
For example:
return data.isApproved ? "approve" : "reject";The returned value determines which route is taken from the current step.
Matching rules
Section titled “Matching rules”- The returned value must exactly match a route name
- Matching is case-sensitive
- Only routes defined on the current step are considered
Failure behaviour
Section titled “Failure behaviour”If no matching route is found:
- The process cannot determine the next step
- The workflow will fail to continue
Common causes:
- Typo in the returned value
- Case mismatch (e.g.
Approvevsapprove) - Route not defined in the process diagram
Default and fallback behaviour
Section titled “Default and fallback behaviour”If a step has a single outgoing route, that route may be treated as the default path.
However, when multiple routes exist, an explicit matching value is required.
Relationship to screens and actions
Section titled “Relationship to screens and actions”Screens and actions return values that must match a route name.
The matching route determines the next step in the workflow.
Best practices
Section titled “Best practices”- Use consistent naming conventions across routes
- Keep route names short and meaningful
- Avoid embedding business logic in route names
- Always ensure returned values are validated and predictable