The Split-n is used to copy an instance n times for processing purposes.
The easiest way to visualize how the Split-n activity operates is to picture a process that solicits bids from external vendors. The company wants to get multiple bids from different vendors and uses the BP-Method to select the lowest bid that meets the company's specifications.
If the number of copies to wait to release property is set, the original instance leaves the Join activity after that number of copies have arrived to this activity.
If there is a due transition leaving the Join activity, the original instance must follow the logic in the due transition.
If there is a deadline for the entire process, the original instance will be rerouted to the Instance Expiration exception if such deadline expires.
If the action variable is set to release in the Method of the Join activity. action = release releases the original instance from the Join activity.
The copy instances automatically inherit all the attributes of the original instance as they leave the Split-n activity. If end users add or change attachments of the copy instances, the attachments are automatically associated to the parent instance once they have reached the Join activity.
Activities within the Split-n / Join circuit cannot have any transitions to or from activities outside it. An exception to this rule is when you use a Grab activity that resides outside the Split-n circuit to handle overrun conditions within the Split-n / Join circuit.
The following table outlines some of the considerations when using the Split N Activity within ALBPM Studio.
| WorkSpace |
The Split-n and Join activities are not visible in WorkSpace. |
| Roles |
Split-n and Join activities reside in automatic roles. They can also reside in user-defined roles. However, no activity will appear in WorkSpace. |
| Variables |
Split-n and Join activities can access instance, local and predefined variables from the BP-Method Editor. Copies have to be created manually and not graphically as it occurs in the Split activity where each outgoing transition will produce a copy creation. To create copies, you have to generate them in the Split-N BP-Method with the following code: i = 0 while i < numOfCopies do // create a copy of the process instance copy= clone(this) // Get ready for next loop i = i + 1 end Join activities can also access instance copies by using copy. as shown below: // Set the original instance variable with the // copy instance variable bidTotal = copy.bidTotal |
| Pre Conditions |
Split-n activities require an incoming instance from another activity in the process. Join activities rejoin each instance copy reaching the Join activity (if the original instance is still there). |
| Post Conditions |
Split-n: When an instance reaches a Split-n activity, the original instance is automatically sent directly to the corresponding Join activity. While still in the Split-n activity, instance copies are created and each copy flows across the path in the Split-n/Join activity circuit. The number of generated copies will depend on the number of copies generated using the variable "copy". Join: The original instance can leave the Join activity due to one of these three reasons:
|
| Transitions |
Split-n activities require at least one or more incoming transition(s). Only one outgoing transition is allowed. Join activities must have only one incoming transition in a Split-n / Join circuit. One or more outgoing transition(s) are required. |
| Tasks |
No tasks can be generated. A BP-method will be automatically created with the same name as that of the activity. The Join Activity associated script will be automatically generated after you check the design. At that moment the Split-Join circuit is consolidated. |
| Business Process Methods |
The Split-n / Join activity circuit creates copies of the original instance based on BP-Method logic. The Split-n activity creates the copies as shown in the following BP-Method: i = 0 while i < numOfSuppliers do // create a copy of the process instance for // this supplier's quote copy= clone(this) copy.supplier = "Supplier" + String(i) copy.supplierNum = i // Get ready for next loop i = i + 1 end Note: If the instance has associated a Separated Instance variable, its value will not be
automatically copied to the copies separated instance variable. Within the
Split-N BP-Method, you have to assigned it manually (e.g.,
copy.separatedvariable = separatedvariable).
The Join activity acts as a marshaling point where each copied instance is used to update variables in the original instance. For example, the Join activity's BP-Method will contain lines like the following: // Take the copy instance variables and use them to set // original instance variables. Use ''copy.'' . supplierName = copy.supplierName costQuote = copy.supplierQuote |