Products | Versions |
---|---|
TIBCO ActiveMatrix BusinessWorks | - |
Not Applicable | - |
Note: Refer to attached files (Filename: screenshot_1.png, screenshot_2.png, screenshot_3.png, screenshot_4.png, screenshot_5.png).
There is fundamental difference in BW 5.x and BW 6.x as far as calling a sub-process is concerned. In BW 6.x, even to call a sub process, you have to create a reference from a main process and have to access the sub process as a service using WSDL. As an advantage, the caller process and calling process are loosely coupled, pure SOA implementation.
As any other WSDL, this WSDL file has input, output and fault(s) as parameters. If you want the fault from the sub process to be caught in the main process or calling process, then the WSDL, which is responsible for calling the sub process, should have fault defined in the WSDL itself. Usually these are called as declared fault. Refer to screenshot_1.
Simple sub process calls involve two processes, i.e., caller and called processes. The caller process uses ‘References’ to call the ‘Service’ implemented in the called process. To make sub process calls from the caller process, you will have to use the Invoke Activity. This Invoke Activity requires service and operation. Refer to screenshot_2.
Once you select the service and operation, it will create a reference in the caller process to make a call to a service implemented in the sub process. You will have to click on a reference activity and select the process which needs to be called from the caller process. Refer to screenshot_3.
Treat the called process or sub process as a service. As any other service, the sub process will either return output or fault. By default, implementation will be configured to return output.
In sub-process > process design block:
1). If you want to propagate the fault caught in a process design block to exception block of the sub process itself, use throw activity.
2). If you want a fault to be sent to the caller process directly, you can use reply activity with declared or undeclared fault.
In both 1) and 2), it is always required to use reply with fault activity in order to send exception / fault to the caller process. Refer to screenshot_4.
In the main process / caller process, there should be a catch block created using the option ‘Create catch’. This catch block is specific for declared faults. Once selected under scope, you will be able to select the fault that you have declared in WSDL. Once done, you can place the appropriate activity, e.g., log, etc. in the exception block and capture the fault propagated from the sub process. Refer to screenshot_5.
Create catch all is a generic catch handler which will also captures undeclared faults. Usually, when any unhandled exception occurs, that can be handled within this catch all block.