Communicating With Other BPMN Processes and Services Using Message Events

20-8 Modeling and Implementation Guide for Oracle Business Process Management See Section 8.13, Introduction to Data Associations , for more information on how to configure data associations.

12. Click OK.

20.3.6 What Happens When You Invoke an Asynchronous BPMN Process Using Message Events

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

20.4 Using Message Events Configured as Boundary Events

You can use message catch events configured as boundary events to wait for an event while an activity is running. If the message arrives after the activity finishes running, then the event is not triggered. You can configure a boundary message catch event as interrupting or non-interrupting. Interrupting boundary message catch events stop running the activity when the expected message arrives. Then the engine starts running the flow defined for the message catch event. The flow defined for interrupting boundary message catch events may resume the main process flow. Non-interrupting boundary catch events do not stop running the current activity. When the expected message arrives the engine starts running the flow defined for the message catch event in parallel to the current activity. The flow defined for non-interrupting boundary message catch events cannot resume the main process flow.

20.5 Using Service Tasks to Invoke Synchronous Operations in Services and BPMN Processes

Service tasks enable you to invoke synchronous operations in services and BPMN processes. When the BPMN Service Engine runs a service task, it invokes the operation specified in the service task and waits for a response. The BPMN Service Engine does not move the token to the next activity until it receives a response from the synchronous service or BPMN process. The services you can use from a service task include BPEL processes, SOA mediators and SOA adapters that expose synchronous operations. You can also use service tasks to invoke other BPMN processes that expose synchronous operations. Communicating With Other BPMN Processes and Services 20-9 See Section 21.4, Using Message Events to Define a Synchronous Operation in a BPMN Processes Interface or Section 21.8, Using Send and Receive Tasks to Define a Synchronous Operation in a BPMN Process for more information on how to define synchronous operations in a BPMN process. Figure 20–2 Invoking a Synchronous BPMN Process or Service Using a Service Task This figure shows a BPMN process that invokes a synchronous operation defined in an external service or in another BPMN process. This BPMN process uses message events to invoke the asynchronous operation.

20.5.1 How to Invoke a Synchronous Service Operation Using a Service Task

To invoke a synchronous service operation you must use a service task. To invoke a synchronous service operation using a service task: 1. Edit the BPMN process. 2. Locate the point in your process where you want to invoke the synchronous service operation. 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 Service.

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

The Type dialog appears. 9. Select the synchronous service you want to invoke.

10. Click OK.

11. From the Operation list, select the operation from the synchronous service to invoke. 12. If the synchronous service 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. 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.