Defining Subprocesses
Use
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:
- Triggering receive-steps
- Receive or send steps for opening or closing a sync/async bridge
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.
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.
Procedure
- Create the subprocess in the Integration Repository (see also: Creating an Object ).
- Define the data that the subprocess is to process as container elements.
- Define the formal parameters for the subprocess in the Formal Parameters view in the object area in the lower right corner of the process editor.
Specify the communication direction for each formal parameter:
- Import: Input parameter that is passed to the subprocess. The caller process must provide the parameter with a value.
- Import (optional): Input parameter that is passed to the subprocess. The caller process can provide the parameter with a value. Whether a value is given or not is optional.
- Export: Output parameter that is passed to the calling integration process. The process can provide the parameter with a value. Whether a value is returned or not is optional.
- Import/Export: Input/output parameter that is passed to the subprocess and returned to the calling integration process. The process can provide the parameter with a value. Whether a value is returned or not is optional.
Result
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: