Reachable Nodes
Syntax
reachableNodes($currentToken)
Description
Returns all nodes that can be reached from the current token of a process instance.
Parameters
| Process name | Type | Type Description | Mandatory | Default |
|---|---|---|---|---|
| currentToken | Token | Current token of a process instance | Yes | - |
Return value
Type: Set<Node>
Returns a set of reachable nodes. Returns false if the token parameter is invalid.
Examples
// Create a process instance with specific name
processInstance = createProcessInstance($startEvent, "Process-001");
// Get one of the current Tokens
currentToken = $processInstance.get(`tl.bpe.execution:ProcessExecution#activeTokens`).firstElement();
// Get all reachable nodes from current token
reachableNodes($currentToken)
Output: A set of reachable Nodes: [Node 2, Node 3, ...]