Subprocesses
Business processes are often very complex and it is difficult to diagram the complete process in one process definition. You can create several smaller process definitions instead of one monolithic process definition. You can then call each process definition from another process definition, when necessary. When you call a process definition, the called process is known as a subprocess. Using subprocesses helps to make more readable process diagrams and you can reuse subprocesses across many process definitions.
To create and call a subprocess, follow this procedure:
Procedure
-
Create a process definition for the subprocess. For more information about creating process definitions, see Developing Process Definitions.
-
Specify the input, output, and any error schemas of the subprocess on the Start and End activities in the subprocess. For more information about specifying the input, output, and error schemas of a process, see Start Activity and End Activity .
-
Create a process definition that will call the subprocess.
-
Place a Call Process activity (located on the General Activities palette) in the process definition. The Call Process activity allows you to map input values into the called process, and optionally allows you to spawn the subprocess into another process instance.
Normally, a subprocess executes in the same process instance as the calling process, and the output of the subprocess is available to all subsequent activities in the process. If you select the checkbox in the Spawn field of the configuration tab of the Call Process activity, the subprocess is spawned into a new process instance. When a subprocess spawns a new process instance, the parent process cannot access the called process’ output.
The following figure illustrates a main process calling a subprocess.
A main process calling a subprocess