Unioning actions gives structure to the relationship between actions.
Union allows for the grouping of actions to create a dependency graph among them. This means that one Action can be set to depend on the completion of another Action for it to be resolved. Essentially, it enables synchronous resolution of Business Processes, ensuring that dependent actions are completed in a specific order. Meanwhile, Non-Unioned
actions can be resolved independently and not in a specific order.
The following code snippet demonstrates how to represent the union
relationships in the graph above when creating a Business Process. The specific value of a union is ALWAYS the index value (0 based) of the target Action, within the actions of a parent Business Process.
{
...,
actions: [
{ type: 'action-a' },
{ type: 'action-b', union: 2 }, // depend on action-c
{ type: 'action-c', union: 3 }, // depend on action-d
{ type: 'action-d' },
{ type: 'action-e' },
]
}
Action Union DocumentationEvery Action has a union title that explains if union is required, and the impact of setting union on the Action.