Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 8 Using Sub-Processes and Process Interfaces : Dynamic Sub-Processes

Dynamic Sub-Processes
See "Dynamic Sub-Processes" in TIBCO Business Studio Concepts
Creating Dynamic Sub-Processes
1.
2.
3.
a.
b.
4.
For a sub-process implementation which resides in an external sub-process library., you could use a script something like the script shown in the following illustration:
5.
For example:
Automatically Passing Different Data To and From Sub-Process Instances
If the Reusable Sub-Process task is multi-instance (or loop) it is possible to automatically pass different data to and from each separate sub-process instance.
Inputting Different Data To Each Sub-Process Instance
1.
2.
appointmentTypeArray.set(1, "PlasterDept");
appointmentTypeArray.set(2, "Physio");
3.
Returning Different Data From Each Sub-Process Instance
1.
2.
At runtime the array field will be populated with the return data from each sub-process instance. The list element index will correspond to the activity loop index from which the sub-process instance was invoked.
For example, if the sub-process returned an integer parameter "ReturnParam" with value "X-OK" when passed "X-Ray", "PL-OK" when passed "PlasterDept" and "PH-OK" when passed "Physio", and you mapped this to an array data field "ReturnArrayField", then:
The way that this data is passed behaves in the same way for multi-instance statically defined sub-process tasks (tasks that reference an actual sub-process at design time).
Controlling the Flow in Dynamic Sub-Processes
The flow of processing within dynamic sub-processes can be controlled using the facilities described in Chapter 5, Controlling Flow in a Process. In particular you can specify whether mutiple instances of the sub-processes should be performed sequentially or in parallel by using the Ordering and Flow Condition fields of the Reusable Sub-Process task. See Creating a Standard Loop for more details.
You can also add additional instances to the loop while the sub-process is running, using a script on a parallel procesing path. For details, see Adding Additional Instances to a Multi-Instance Loop Task Whilst the Task is in Progress.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved