Token is the concept that describes the current position in the process flow. When you start the process you have a graph of nodes and based on the configuration you will go from one to another based on the defined sequence (connection between nodes).
The token is a BPMN concept that represents a state within a process instance. It keeps track of the current position in the process flow and is used to store data related to the current process instance state.
A token is created each time a new process instance is started. As the actions on the process instance are executed, the token advances from one node to the next. As a node can have several actions that need to be executed, the token is also used for keeping track of the actions executed in each node.
In case of parallel gateways, child tokens are created for each flow branch. The parent token moves to the gateway sync node and only advances after all the child tokens also reach that node.
The image below shows how a token advances through a process flow:
The token will only move to the next node when there are no more mandatory actions from the current node that need to be executed. The token will also wait on a node in case the node is set to receive an event from an external system through Kafka.
There will be cases when the token needs to be stopped in a node until some input is received from the user. If the input from the user is needed for further advancing in the process, the token should only advance after all data was received. A mandatory manual action can be used in this case and linked to the user action. This way we make sure that the process flow advances only after the user input is received.
The current process instance status can be retrieved using the FlowX Designer. It will display some info on the tokens related to that process instance and the current nodes they are in.
In case more details are needed about the token, you can click the Process status view button, choose a token then click the view button again:
If there are parallel gateways configured in a proces, you will have more tokens, created for earch parallel path.
Token Status | Description |
---|---|
ACTIVE | the token state is set to active when tokens are created; a parent token is reactivated when all child tokens reach the parallel gateway closing node. |
INACTIVE | child tokens are set to inactive when they arrive in a parallel gateway closing node; the current token is set to inactive when it reaches a final node. |
ABORTED | the current token is set to Aborted when it moves backward in order to redo a series of previous actions in the process - it is reset, and a new token is activated. |
ON HOLD | when a parallel split gateway node is reached, the parent token is set to On hold until all the child tokens reach the parallel gateway closing node; the parent token does not have a “Retry” action icon until all the child tokens are finished. |
DISMISSED | when the process/subprocess reaches a certain node and it is canceled/exited. |
EXPIRED | when a defined “expiryTime” in the process definition passes the token will change to this status. |
TERMINATED | when the process is terminated by a termination request. |
Status Current Node | Definition |
---|---|
ARRIVED | when the token reaches the new node |
EXECUTING | when the token execution starts |
EXECUTED_COMPLETE | after executing node actions, if all the mandatory actions from the node are completed |
EXECUTED_PARTIAL | after executing node actions, if there are still mandatory uncompleted actions on it |
WAITING_MESSAGE_EVENT | when the token reaches an intermediate message catch event node, the token will be set to this status |
WAITING_TIMER_EVENT | when the token reaches an intermediate timer event node, the token will be set to this status |
WAITING_MESSAGE | when the token waits for a message from another system |
MESSAGE_RECEIVED | after the message was received |
MESSAGE_RESPONSE_TIMED_OUT | if the message was not received in the set timeframe |
You can access a detailed view of the token status by going to your Process instance -> Tokens -> View (eye icon):
Here you will find details like: