How to Configure the Start Operation of a BPMN Process as Synchronous Using Message Events

21-14 Modeling and Implementation Guide for Oracle Business Process Management Figure 21–5 BPMN process that exposes an asynchronous operation defined using send and a receive task This figure shows a BPMN process that exposes an asynchronous operation defined using send and receive tasks, and how this reflects in the SOA Composite editor. If you used a send task to expose an operation, then you must use a receive task to define the callback operation. See Section 21.6.1, Defining the Callback Interface for BPMN Processes Using a Send Task for more information on how to define a callback operation using send events.

21.6.1 Defining the Callback Interface for BPMN Processes Using a Send Task

A BPMN process must expose a callback operation for each of the asynchronous operations it defines. You can define a callback operation using a send task. The callback operation returns the response to the service or process that invoked the asynchronous operation. If the service or process is waiting for the answer, then they receive it immediately. If the service or process is not waiting for the answer yet, then they receive it when they get to the part of the process or code that waits for the answer. The callback operation may define output arguments. If it defines output arguments you must map their values to the data objects in the process using data associations. Figure 21–5 shows a receive task that exposes the BPMN process callback operation. Defining the Process Interface 21-15

21.7 Defining Asynchronous Processes Operations Using Send and Receive Tasks

You can define asynchronous operations in a BPMN Process using send and receive tasks. If you expose an asynchronous operation, then you must expose a start operation. The process invoking the asynchronous service must invoke the start operation first to create an instance in the process. The asynchronous operation runs over the created instance. You must also specify a callback operation for each of the asynchronous operations you define.

21.7.1 How to Define an Asynchronous Process Operation Using Send and Receive Tasks

You can define an asynchronous process operation using send and receive tasks. To define an asynchronous process operation using send and receive tasks: 1. Edit the BPMN process. 2. Change the trigger of the start and end events to None: a. Right-click the event.

b. Select Properties.

c. Click the Implementation tab.

d. From the Implementation Type list, select None.

e. Click OK.

3. Add a receive task immediately after the start event. 4. Right-click the receive task.

5. Select Properties.

6. Click the Implementation tab.

7. Select Create Instance.

8. In the Conversation section, select Initiates.

9. In the Conversation Properties section, select Define Interface.

10. If your asynchronous BPMN process requires input data, then you must define the process input in the Argument Definition section. For more information on how to define the process output, see Section 21.10, Defining the Process Input and Output .

11. Expand the Advanced section.

12. Select Asynchronous.

13. Enter a name for the start operation. The SOA Composite uses the name you specify for the operation to display it in the SOA Composite.

14. Click OK.