
You can store any functionality that you want to use in multiple integration processes in a subprocess. You define the subprocess just once and call it from the relevant integration processes as required.
Execution
A subprocess cannot be executed separately; it can only be called from another process. A subprocess, in turn, can call other subprocesses. To call a subprocess, you use the step type Call Subprocess in the calling process.
A subprocess is executed synchronously, which means the calling process waits until the subprocess has been executed before it continues. Only then does the system resume the processing of the calling process.
Valid Step Types
You can use any step types in subprocesses, with the exception of the following:
Formal Parameters
Subprocesses and their calling processes use formal parameters to communicate with each other. You define formal parameters in a similar way to container elements. You do this, however, in a separate view in the process editor. For formal parameters, you need to specify the communication direction in addition to the name, category, and type. Formal parameters are visible and valid within the entire process, in the same way as global container elements. This means that you can use formal parameters anywhere in the process, including in expressions or conditions.
Exceptions and Exception Handling
In a subprocess, you can trigger exceptions and assign exception handlers that are defined within the subprocess. An exception is not forwarded to the caller process.
To make an exception visible in the caller process, proceed as follows:
In the subprocess, define an exception handler for the entire subprocess. In the exception handler, enter the relevant exception in a formal export parameter. Finally, query the formal export parameter in the caller process.
If an exception for which no exception handler has been defined is triggered in the subprocess, the subprocess and all processes in the call hierarchy are given the status Error.
Canceling the Subprocess
Subprocesses cancelled by a control step are not visible in the caller process. The caller process continues to wait for the subprocess to be executed and is not given a specific error status.
Specify the communication direction for each formal parameter:
You have defined a subprocess and can call it from an integration process. You use the step type Call Subprocess to do this.
See also: