Oracle Workflow Developer's Guide Release 2.6.3.5 Part Number B12161-02 |
Previous | Next | Contents | Index | Glossary |
When you spawn a detail process from a master process in Oracle Workflow, you are in effect creating a separate process with its own unique item type and item key. You define the master/detail relationship between the two processes by making a call to the Workflow Engine SetItemParent API after you call the CreateProcess API and before you call the StartProcess API when you create the detail process. See: SetItemParent, Oracle Workflow API Reference.
You can then use the two activities described below to coordinate the flow in the master and detail processes. One activity lets you pause a process and the other signals the halted process to continue. To use these activities, you place one activity in the master process and the other in each detail process.
Both activities contain two activity attributes that you use to identify the coordinating activity in the other process(es).
You can use multiple Wait for Flow activities in the same workflow process. For example, if a master process launches two different sets of detail processes at different stages, the master process should include a separate Wait for Flow activity node for each set of detail processes. In this case, when you call the WF_ENGINE.SetItemParent API to associate a detail process with the master process, you must specify the parent context as the activity label name for the Wait for Flow activity node that corresponds to this detail process.
If the parent process contains only one Wait for Flow activity, however, you can leave the parent context parameter null when calling WF_ENGINE.SetItemParent.
When a Continue Flow activity is executed, the WF_STANDARD.CONTINUEFLOW procedure checks whether the corresponding Wait for Flow activity is associated with any other processes that have not yet completed their Continue Flow activities. If so, the waiting process keeps waiting for those other processes. If the Wait for Flow activity is not waiting for any other processes, then the WF_STANDARD.CONTINUEFLOW procedure completes the Wait for Flow activity so that the process that was waiting now continues to the next activity.
Master Process
Detail Process
Note: You can include a Wait for Flow activity in a master process without including a Continue Flow activity in one or more of its corresponding detail processes. However, in this case you must ensure that all detail processes without a Continue Flow activity are entirely completed before the Workflow Engine attempts to continue the master process based on the coordination activities that you do include. That is, at least one of the following must occur after the detail processes without a Continue Flow activity are completed:
Otherwise, the Workflow Engine cannot properly coordinate the continuation of the master process.
If it does not matter when any of the detail processes complete before a master process continues (or when a master process completes before all the detail processes continue), then you simply omit both of the coordination activities from your master/detail processes.
Attention: If you include a Continue Flow activity in a process, you must also include a Wait for Flow activity in its corresponding master or detail process as defined by the activity attributes in the Continue Flow activity.
Previous | Next | Contents | Index | Glossary |