Try OpenEdge Now
skip to main content
BP Server Developer's Guide
Workstep template management : Nested workstep with multi-subprocesses
 

Nested workstep with multi-subprocesses

Business Process Server supports subprocess worksteps that allow invoking a child process from the main process. This enables developing complex processes which include subprocesses and reuse of subprocesses across multiple applications.
Many applications, such as insurance, mortagage, and project tenders, require instantiation of subprocess instances depending on the data dynamically. For example, consider an insurance claim process. Depending on the number of witnesses, many witness subprocesses need to be instantiated by passing data selectively and composing the outputs of responses. It is very difficult to build a process that can support a dynamic number of witness subprocesses without additional workstep constructs.
Additionally, there are situations where you need to create different subprocesses depending on the runtime data. For example, when documentation for a new product is developed, a project manager selects the type of documentation needed for that product; for example, "User's Guide", "Developer’s Guide", and "Programmer’s Guide". Depending on the selection, that particular set of subprocesses is instantiated from a predefined list of subprocesses.
BP Server extends the nested subprocess workstep to have a mapped dataslot as a performer that can contain multiple subprocess names in a comma-separated string or a list of strings. This is done by mapping input dataslots with index mapping. This approach helps to pass selective input dataslots and obtain selective outputs to and from multiple subprocesses.
You have to perform the following two steps to use an indexed application:
*Specify a LIST type dataslot as the performer of your subprocess workstep. The values of the list should be the names of the subprocess process templates. For example, if you want to create three instances of the "ordering" process template, then the value of the LIST dataslot should be specified as [ordering, ordering, ordering]. For more information, see Workingwith subprocesses.
*You can pass different values to each of the subprocesses by mapping a LIST dataslot in your main process to a dataslot (such as CHARACTER or INTEGER) in your subprocesses. Each subprocess must have the same Type of dataslot as the input dataslot for this to work correctly.
For the indexed dataslots, individual elements of the LIST dataslot are provided as the input for the subprocesses. For example, AuthorIDs=[G G Marquez, A Roy]. In this case, the first subprocess has a value G G Marquez and the second subprocess has A Roy. All the remaining subprocesses receive null values.
The non-indexed dataslot is passsed as it is to all the subprocesses. For example, PublisherName, which is a non-indexed CHARACTER dataslot is sent as a CHARACTER dataslot to the Subprocesses. The publisheraddresses dataslot, which is a non-indexed LIST datasot is sent as an LIST dataslot to the Subprocesses.
* Limitations