Routes¶
Routes define the connections between Actions and Tasks, establishing the workflow's path.

Multiple routes can branch from a single action, creating parallel workflow paths. If no valid route is found, the workflow terminates.
Route Properties¶
Instructions: Overrides the next task's instructions. Useful for dynamically updating instructions based on the action taken (e.g., changing instructions after a "Reject" action).
Validation Rule: Determines the route's validity. The rule can be a Decision Table or a scripting expression. A route is considered valid if no validation rule is defined.
Scripting Objects¶
This script is executed in the backend context of the Emakin and does not have an accessible a browser DOM context and therefore navigator based JavaScript libraries such as jQuery are not available.
The following objects are available:
$WorkItemCurrentWorkItemthat is being processed.$InstanceInstance of theInstancecurrent workflow instance.$TestModeIndicates whether the workflow is running in test mode. In test mode, evaluates totruevalue.$PriorityPriority of the current workflow instance 0 (lowest) to 5 (highest$InitiatorIdentifies the workflow initiator. Note that this may benullfor module-type tasks.$CultureCurrent culture of the workflow instance. Originated from the initiator's culture but can be overridden. Culture is specified in the formatlanguagecode2-country/regioncode2. Example: (en-USortr-TR)$TemplatesProvides access to templates defined in the pool definition. Used for rendering the text content depending on the culture of the workflow instance.$XmlProvides access to the process data model or workflow data.$CaseInstance ofCaseinstance if workflow started on a case.$poolVariableCustom defined pool variable by name. Variables are defined in Variables$ServicesAllows calling SOAP services with JSON or XML content types.$DecisionsAllowing you to execute decision tables and models on process.$scriptModuleCustom defined script module. Script modules are defined in Script Modules$DomainProvides access to the domain information and related methods like initiating a workflow or creating a new case.$ActivityStreamAllows pushing system-generated activities to the domain activity stream.$MembershipProvides access to users and organizational database objects.$DatabaseAllows you to perform relational database operations.$CryptoProvides access to cryptographic functions such as hashing and encryption.$RestAllows interaction with REST services using JSON or XML content types.$CalendarProvides access to calendar functions like adding or subtracting date in calendar rules.$FilesAllows access to the standard file repository for basic files.$DocumentsProvides access to the document archive.$DelegationPprovides methods to manage delegations between users.$MessagesProvides functionality for sending new e-mails and parsing existing e-mail messages.$XmlRepositoryProvides access to the non-relational XML repository database.
Sample Validation Rules¶
The following examples demonstrate route validation using decision tables and expressions.
Route Validation with Decision Table¶
This decision table validates the route if the "Department" field is "Sales" or "Accounting". Other values invalidate the route.

Route Validation with Expression (FEEL)¶
Using FEEL:
1 | |
Route Validation with Expression (JavaScript)¶
This script is executed in the backend context of the Emakin and does not have an accessible a browser DOM context and therefore javascript libraries such as jQuery are not available.
Using JavaScript:
1 | |