Use Split-Join rule
General overview
The Split-Join rule is used to separate every single record (or document) from Input Data into a few records to let them pass through different steps of the Business Process (either Bot or Manual Tasks) in parallel (in the split point), and then combine the processed records back into a single record or a document (in the join point) to process the consolidated results from the previous steps further.
When a record in Business Process is split into multiple, new records are routed to different steps, so some of them are processed faster, while the others require more time to get processed. It happens due to different types of steps, as some of them are Bot Tasks and the others are Manual. In case of Manual Tasks, availability of workforces to perform assignments is a key point to how fast the records are processed.
The records which are processed faster reach the Join rule quicker. They should wait for the rest of the records to get joined for processing at the step behind the rule.
The original Input Data record is immediately promoted to the next step after the rule, when all the split records from this original record arrive, and gets processed in the step.
Configure Split-Join rule
To implement the Split-Join rule, the corresponding rules must be marked with the split and join flags:
RuleContext.SPLIT_RULE– the Split rule markerRuleContext.JOIN_RULE– the Join rule marker
If there are multiple split-join flows (nested, parallel, or serial) in the Business Process, each flow should have its own name, unique in the context of the Business Process. This name should be added to the marker after the semicolon for the corresponding composite rule. For example:
- Outer Split rule:
RuleContext.SPLIT_RULE:main- Inner branch #1:
- Split rule:
RuleContext.SPLIT_RULE:subprocess_N1 - Join rule:
RuleContext.JOIN_RULE:subprocess_N1
- Split rule:
- Inner branch #2:
- Split rule:
RuleContext.SPLIT_RULE:other_subprocess - Join rule:
RuleContext.JOIN_RULE:other_subprocess
- Split rule:
- Inner branch #1:
- Outer Join rule:
RuleContext.JOIN_RULE:main
tip
For the rule setup, refer to Composite rules | SPLIT_RULE and JOIN_RULE and the Edit rule section.
Add Split-Join to Business Process
You can add the Split-Join rule to a Business Process using one of the following methods:
- from the Toolbar or Canvas Context Menu. A blank rule is created.
- from the Sidebar or Element Context Menu. In this case, the rule will be copied from the source rule. You can edit the rule if needed.
Business Process flow description
The sample Business Process below explains how the Split-Join works in opening an account.
Passport details of a client are used as Input data.
Using the Split rule, the details are sent to different steps to acquire and validate the information.
Processing of split records includes the following steps:
- Check the client's debts to find out the current client's financial situation (Bot Task).
- Collect information about the active client accounts to learn how many active accounts the client has (Bot Task).
- Validate the client's address to make sure, that the address provided is valid (Manual Task).
- Validate the client's passport authenticity to confirm, that the passport provided is real (Manual Task).
note
Manual steps are executed slower than Bot steps depending on the availability of the workforce and how fast the Workers perform their tasks.
The Join rule is intended to manage the processing of the split records. It sends processed split records to the next step immediately as they arrive at the rule and triggers the Bot step execution after the last split record has passed through it.
At the next step after the Join rule, the algorithm waits till all split records of the original one arrive and starts the Bot step execution. In our case, the Bot creates the account or rejects the creation depending on the information in the joined record. If the record R1 from Input Data started earlier than the record R2, but all split records of the record R2 pass sooner through the Join rule, the Bot step will execute the record R2 and then wait for all the split records from the record R1.