Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 10 Palette Reference : Invoke Process

Invoke Process
Activity
The Invoke Process activity invokes a TIBCO ActiveMatrix BusinessWorks automated process. This activity spawns a new process instance to execute the specified process definition. You must pass any desired data into the process instance by way of an input variable or input mapping. Process variables from the current orchestration process are not available to the called TIBCO ActiveMatrix BusinessWorks process.
Configuration
The Configuration tab has the following fields.
The process definition you would like to call. You can browse the available process definitions.
An XPath formula specifying the name of the process to call. Use this field to dynamically determine which process to call when the process instance is running.
See Dynamically Determining the Process to Call for more information about this field.
Checking this box indicates that the called process definition must complete before proceeding to the next activity in the orchestration process.
This option is only available for process definitions that do not produce output. That is, for process definitions that have a schema defined on the Input Editor tab of the End activity, you must wait for their completion before continuing. For process definitions that have no output, you can optionally uncheck this field to indicate that the process definition can execute asynchronously and the orchestration process can continue on to the next activity.
This field can contain an XPath expression that specifies a custom ID for the process instance. This ID is displayed in the View Service dialog of TIBCO Administrator, and it is also available in the $_processContext process variable in the spawned process instance.
Invoke Message Correlations
Correlations for the outgoing message to the process definition. See Correlations for more information about correlations.
Reply Message Correlations
Correlations for the incoming message received from the process definition. This field is only available when the process definition selected contains an output schema. See Correlations for more information about correlations.
File to use for the Invoke Process activity in the orchestration process. This allows you to customize the look of your activity with your own images.
Dynamically Determining the Process to Call
You can use the Process Name Dynamic Override field on the Configuration tab to specify an XPath expression that determines which process to call. This is useful for calling a different process depending upon the value of the XPath expression. For example, for incoming orders over $10,000, you wish to call a process that includes additional approval tasks. For orders under $10,000, you wish to call a process that handles the order automatically. If the Receive Starter is named IncomingOrder and the order amount is stored in a field named orderAmount, then your XPath expression to determine which process to call may look like the following:
 
if($IncomingOrder/orderAmount > 10000) then
           ’/MyProject/manualApproval.process’
      else ’/MyProject/processOrder.process’
Use the full path and name of the process file as stored in the project directory.
When you use the Process Name Dynamic Override field, you must also specify a process to call in the Process field. The input, output, and error definitions of the specified process must be the same as any process that the expression in the Process Name Dynamic Override field can evaluate to.
In the example above, you may create a process named orderProcessOrApprove. The only purpose of this process is for specifying the input, output, and error schemas. Place this process in the Process field of the Call Process tab. Then, create the manualApproval and processOrder process definitions as copies of the orderProcessOrApprove process. The Call Process activity then has the correct input, output, and error schemas for all processes that can be called.
If you use the Process Name Dynamic Override field, make sure you include all potentially callable subprocesses when you create your Process Archive for deployment. TIBCO Designer cannot determine which subprocesses are potentially callable at design time, and therefore they cannot be automatically included in a process archive. See TIBCO Designer User’s Guide for more information about creating process archives.
Join Condition
The Join Condition tab allows you to define an expression based on the values of the incoming transitions to the activity. If the expression evaluates to true, the activity is executed, if the expression evaluates to false, either the activity is bypassed or a fault is thrown. See Transitions and Join Conditions for more information about join conditions.
The Join Condition tab has the following fields.
Specifies what action to perform if the join expression evaluates to false. The following options are available:
Inherit setting — use the default action specified within the current scope. The current scope is either the current group containing the activity or the orchestration process if the activity is not within a group.
Bypass activity if false — skip the processing of the activity, set the outgoing transition conditions to false without evaluating them, and resume processing.
Throw fault if false — throw a joinFailure fault and switch control to an error-handling routine configured to catch all unhandled exceptions. If the exception is not caught, the fault is propagated to the calling environment.
The expression to evaluate to determine if the activity should be executed. The only data available to this expression is the value of any transitions into the activity. You can use the XPath Formula Builder to create the join expression.
Input Variable
The Input Variable tab allows you to specify whether you will use the contents of a process variable as input to this activity or you will use the Input tab to specify input bindings as XPath expressions. If you choose to use a process variable, the schema of the variable must match the input schema of the activity exactly.
Use Input Variable — specifies that you will select an input variable to use as input for the activity. The schema of the variable must match the input schema of the activity or an error is thrown when this activity is executed.
Use Input Binding Tab — specifies that you will use the Input tab to create mappings and XPath expressions to provide input for this activity.
When Use Input Variable is selected in the Input Style field, this field allows you to select from a list of process variables to use as the input for the activity.
Input
The Input tab is only enabled if Use Input Binding Tab is selected in the Input Style field on the Input Variable tab. See TIBCO ActiveMatrix BusinessWorks Process Design Guide for more information about mapping and transforming input data.
The input for the activity is the following.
The input to the called process is defined by the Output Editor tab in the called process’ Start activity. See TIBCO ActiveMatrix BusinessWorks Process Design Guide for more information.
Output
The output for the activity is the following.
The output of the called process is defined by the Input Editor tab in the called process’ End activity. See TIBCO ActiveMatrix BusinessWorks Process Design Guide for more information.
Output Variable
The output variable tab allows you to select a process variable to contain the output of the activity. The schema of the process variable must match the schema of the output for the activity shown on the Output tab.
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved