How to Invoke a Synchronous Service Operation Using a Service Task

Communicating With Other BPMN Processes and Services 20-15 13. If the asynchronous BPMN process requires input data, then you must specify how the data objects in the project map to this input data, by configuring the send task data association. See Section 8.13, Introduction to Data Associations , for more information on how to configure data associations.

14. Click OK.

15. Follow the procedure described in Section 20.7.5, How to Use a Receive Task to Invoke the Callback Operation of an Asynchronous BPMN Process to invoke the callback operation of the asynchronous process.

20.7.5 How to Use a Receive Task to Invoke the Callback Operation of an Asynchronous BPMN Process

You can use a receive task to invoke the callback operation that pairs with an asynchronous process operation. To invoke the callback operation of an asynchronous BPMN process: 1. Edit the BPM process where you want to invoke the callback of the asynchronous BPMN process. 2. Locate the point in your process where you want to invoke the callback operation of the asynchronous BPMN process. 3. Add a receive task in the point you located in your process. 4. Right-click the receive task.

5. Select Properties.

6. Click the Implementation tab.

7. In the Conversation section, select Continues.

The Properties section changes, and the Initiator Node list appears. 8. From the Initiator Node list, select the activity in your process that invokes the asynchronous process. The content of the Properties section changes, and the Process field and the Node list appear.

9. Click the Browse button next to the Process field to select the asynchronous

process. The Type dialog appears. 10. Select the asynchronous BPMN process whose callback you want to invoke.

11. Click OK.

The Type dialog disappears and the receive task properties dialog shows the service you selected in the name field. 12. From the Node list, select the callback operation to invoke. 13. If the asynchronous callback operation requires input data, then you must specify how the data objects in the process map to this input data, by configuring the receive task data association. See Section 8.13, Introduction to Data Associations , for more information on how to configure data associations. 20-16 Modeling and Implementation Guide for Oracle Business Process Management

14. Click OK.

20.7.6 What Happens When You Invoke an Asynchronous BPMN Process Using Send and Receive Tasks

When you invoke an asynchronous service operation using a send task, the BPMN Service Engine does not wait for the service to answer. It continues running the flow objects that follow to the send task. The BPMN process can obtain the response of the asynchronous service by invoking the service callback operation using a receive task. Even if the service finishes running, the BPMN process does not receive the service response until it invokes the callback operation using a receive task. If the service is still running when the BPMN Service Engine runs the receive task, then the engine waits for the service operation to complete before passing the token to the next flow object in the process.

20.8 Introduction to Invoking a Process Using Call Activities

You can invoke a process from another process using call activities. The invoked process is a child of the process invoking it. When you run a call activity, the engine does not create a new token for the reusable process. The token in the parent process passes to the reusable process. When the token completes the child process, it returns to the parent process to continue running the activities that follow the call activity. The child process must be a reusable process. Reusable processes can be invoked from multiple processes. You can only start a reusable process by invoking it from a call activity. You cannot access reusable process from other SOA components because they are not part of the SOA composite. The start event of a reusable process must always be of type none. The end event can be a error or a message event.

20.9 Invoking a Process Using Call Activities

You can use call activities to invoke a process from another process. The child process must be a reusable process. You can invoke a reusable process from multiple processes within your BPM project.

20.9.1 How to Invoke a Process Using Call Activities

You can invoke a process from another process using call activities. The invoked process must be a reusable process. To invoke a process using call activities: 1. Add a call activity to your process. 2. Right-click the call activity.

3. Select Properties.

4. Click the Implementation tab.