How to Invoke Asynchronous Service Operation Using Message Events

20-10 Modeling and Implementation Guide for Oracle Business Process Management

13. Click OK.

20.5.2 What Happens When You Invoke a Synchronous Service Operation Using a Service Task

When the BPMN Service Engine runs a service task, it waits for the service to respond before continuing with the process flow. When the service finishes running, it sends the response to the service task. If the service operation returns output data, then this data is mapped to the data objects in the project using the service task data association.

20.5.3 How to Invoke a Synchronous BPMN Process Operation Using a Service Task

You must invoke a synchronous BPMN process operation using a service task. To invoke a synchronous BPMN process operation using a service task: 1. Edit the BPMN process.

2. Locate the point in your process where you want to invoke the synchronous

BPMN process.

3. Add a service task in the point you located in your process.

4. Right-click the service task.

5. Select Properties.

6. Click the Implementation tab.

7. In the Service Task section, select Process.

8. Click the Browse button next to the Process field.

The Type dialog appears.

9. Select the synchronous service you want to invoke.

10. Click OK.

11. From the Node list, select the event or activity from the synchronous BPMN process to invoke. 12. If the synchronous BPMN process requires input data or returns output data, then you must specify how the data objects in the project map to this data, by configuring the service task data association. See Section 8.13, Introduction to Data Associations , for more information on how to configure data associations.

13. Click OK.

20.5.4 What Happens When You Invoke a Synchronous BPMN Process Operation Using a Service Task

When the BPMN Service Engine runs a service task, it waits for the synchronous BPMN process to respond before continuing with the process flow. When the synchronous BPMN process finishes running, it sends the response to the service task. If the synchronous BPMN process returns output data, then this data is mapped to the data objects in the project using the service task data association. Communicating With Other BPMN Processes and Services 20-11

20.6 Communicating With Other BPMN Processes and Services Using Send and Receive Tasks

Send and receive tasks enable you to communicate with the other BPMN processes and services in your project. The only difference between message events and send and receive tasks is that you can add boundary events to the latter. If you are invoking an asynchronous service and you want to add a deadline using a timer event configured as boundary, then you must use a send and a receive task instead of using message events. You can use send and receive tasks to: ■ Invoke an asynchronous service. ■ Invoke an asynchronous BPMN process. ■ Define an interface for other processes to communicate with your process. To use a receive task to define the start operation of a process, you must locate it after a none start event and configure it to create instances. The implementation of the different message events varies according to the type of event and their role in the conversation. Table 20–1 describes the different implementation of message events.

20.7 Using Send and Receive Tasks to Invoke Asynchronous Services and Asynchronous BPMN Processes

You can use send and receive tasks to invoke asynchronous operations in services and BPMN processes. Note: The send and receive tasks perform similar functionality to the throw and catch message events. However, it is recommended that you do not mix both within a single process. Table 20–2 Send and Receive Tasks Implementation Task Initiates Conversation Continues Conversation Send Task ■ Invoke a Service ■ Invoke a BPMN Process If it continues a receive task that defines an interface: ■ Define the callback interface for an asynchronous operation ■ Define the output for a synchronous operation ■ Define an exception for a synchronous operation Receive Task ■ Define the interface of the operation ■ Use an interface from the business catalog If it continues a receive task that defines an interface: ■ Use the interface of the receive task it continues ■ Define the interface of the operation If it continues a sent task that invokes a service or a BPMN process: ■ Invoke the callback of the service or the BPMN process