Sequence Determining - Registration Order
To order workflows, a registration order is established. For incoming messages, one of the fields in the message can be designated as registration order.
In such cases, registration order should typically be a date so that chronological order can be maintained. However, if needed, other ordering data can be used (for example, unique sequence numbers.
For all workflows initiated by other channels, the application generates the registration order as a unique, sequenced long number. The application ensures that no two events executing concurrently share the same registration order value.
The event with the earlier registration order will be taken up for execution by the workflow engine and other dependent events with a later registration order will have to wait in the queue till the currently executing event completes or gives up control.