Call Process

The Call Process activity calls and executes an existing direct subprocess. Input data specified on the called subprocess is used by the Call Process activity.

General

The General tab has the following fields.

Field Description
Name The name to be displayed as the label for the activity in the process.
Process Name The subprocess you want to call. Click the Look Up icon or the Go To icon to select a direct subprocess.
Tip: An alternative way to call a subprocess contained in the same project, enter the name of the package and the name of the subprocess, separated by a period, in this field. In this example, <PackageA> is the name of the package, and <Process1> is the name of the subprocess.

<PackageA>.<SubProcess1>

To call a subprocess in a separate project, enter the name of the project, the name of the package, and the name of the subprocess, separated by periods, in this field. In this example, the name of the project is<ProjectB>, the name of the package is <PackageB>, and the name of the subprocess is <SubProcess2>.

<ProjectB>.<PackageB>.<SubProcess2>

Process Name Dynamic override Configuring this field is optional. Use this field to dynamically determine the subprocess to call when the process instance is running. Click the Edit XPath Expression icon to specify a value for this field in the XPath Builder wizard. For additional details, refer to Dynamically Determining the Process to Call.
Spawn Optional. If you select the Spawn check box, the parent process does not wait for the called subprocess to complete, the subprocess is executed in a separate process instance, and the parent process cannot access the output of the called process.

Description

Provide a short description for the activity.

Input

The following is the input for the activity.

Input Item Datatype Description
input varies The input to the called process is defined in the Output Editor tab of the Start activity of the called process.

Output

The following is the output for the activity.

Output Item Datatype Description
output varies The output of the called process is defined in the Input Editor tab of the End activity of the called process.

Fault

The Fault tab lists faults that the called subprocess might throw with a Throw activity. To deal with these faults, add a Catch Specific, or Catch All block to the Call Process activity.

Dynamically Determining the Process to Call

You can use the Process Name Dynamic Override field on the General tab to specify an XPath expression that determines which direct subprocess to call. This is useful for calling a different direct subprocess depending upon the value of the XPath expression. For example, you have an incoming HTTP request that contains an attribute named orderAmount

For all incoming orders over $10,000, you want to call a direct subprocess that includes activities in the Manual Work palette to obtain the proper approvals. For orders under $10,000, you want to call a direct subprocess that handles the order automatically. You can create the following expression that resolves to the proper direct subprocess name for each type of order:

if($IncomingOrer/orderAmount > 10000) then
						then 'MyProject.manualApproval' else
						'MyProject.processOrder'

Use the full path and name of the direct subprocess file as stored in the project directory.

When you use the Process Name Dynamic Override field, you must also specify a direct subprocess to call in the Process field. The input, output, and error definitions of the specified direct subprocess must be the same as any direct subprocess that the expression in the Process Name Dynamic Override field can evaluate to.
Note: It may be helpful to create process definitions that act as programmatic interfaces when using the Process Name Dynamic Override field. In the example above, you may create a direct subprocess named orderProcessOrApprove. The only purpose of this direct subprocess is for specifying the input, output, and error schemas. Place this direct subprocess in the Process Name field of the General tab of the Call Process activity. Then, create the manualApproval and processOrder process definitions as copies of the orderProcessOrApprove direct subprocess. The Call Process activity then has the correct input, output, and error schemas for all direct subprocesses that can be called.
To dynamically call a direct subprocess, that has been created inside of a Shared Module, from an Application Module, use the following syntax:
'SM_Name/Package_Name.SubProcess_Name
Note: When the Call Process activity is in a local JDBC or JMS transaction, and the Spawn check box is not selected, the direct sub processes called by the Call Process in the Local Transaction are also a part of the same local transaction.