How to Handle an Exception Using an Event Subprocess

Communicating With Other BPMN Processes and Services 20-1 20 Communicating With Other BPMN Processes and Services This chapter describes how to develop a BPMN process that communicates with other BPMN processes and services. It shows you how to invoke other processes or services and how to broadcast a message to multiple process and how to configure your process to wait for a specific broadcast message. This chapter includes the following sections: ■ Section 20.1, Introduction to Communication with Other BPMN Processes and Services ■ Section 20.2, Communicating With Other BPMN Processes and Services Using Message Events ■ Section 20.3, Using Message Events to Invoke Asynchronous Services and Asynchronous BPMN Processes ■ Section 20.4, Using Message Events Configured as Boundary Events ■ Section 20.5, Using Service Tasks to Invoke Synchronous Operations in Services and BPMN Processes ■ Section 20.6, Communicating With Other BPMN Processes and Services Using Send and Receive Tasks ■ Section 20.7, Using Send and Receive Tasks to Invoke Asynchronous Services and Asynchronous BPMN Processes ■ Section 20.8, Introduction to Invoking a Process Using Call Activities ■ Section 20.9, Invoking a Process Using Call Activities ■ Section 20.10, Introduction to Communication Between Processes Using Signal Events ■ Section 20.11, Communicating Between Processes Using Signal Events

20.1 Introduction to Communication with Other BPMN Processes and Services

Oracle BPM provides multiple ways for BPMN processes to communicate with other processes or services: ■ Messages 20-2 Modeling and Implementation Guide for Oracle Business Process Management They enable you to invoke asynchronous services or asynchronous BPMN processes. You can also use them to define the interface your process exposes to other processes or services. See Section 20.2, Communicating With Other BPMN Processes and Services Using Message Events , for more information about message events. ■ Send and Receive Tasks They are very similar to message events. You can choose to use one or the other. The only difference they have with message events is that they support boundary events. They enable you to invoke asynchronous services or asynchronous BPMN processes. You can also use them to define the interface your process exposes to other processes or services. See Section 20.6, Communicating With Other BPMN Processes and Services Using Send and Receive Tasks , for more information about send and receive tasks. ■ Signal Events They enable you to broadcast a message to multiple process. The processes waiting for that specific message react to it. See Section 20.11, Communicating Between Processes Using Signal Events , for more information about signal events.

20.1.1 Introduction to Synchronous and Asynchronous Operations

Message events, send and receive tasks, and service task use operations to communicate with other BPMN processes or services. These operations can be synchronous or asynchronous. The main difference between a synchronous and an asynchronous operation is how they respond when you invoke them. When you invoke a synchronous operation, you send a message and then wait for an response before proceeding with the process flow. When you invoke an asynchronous operation, you send a message but do not wait for an answer to proceed with the process flow. The asynchronous operation receives the message and starts running. You can obtain the answer of an asynchronous operation by invoking a callback operation. If you invoke the callback operation before the asynchronous operation finishes running, then you must wait for it to complete before getting the answer. Message events and send and receive task require you to specify how to associate an operation with its corresponding callback. Conversations allow you to group one or more operations with their callback. A conversation may define multiple operations that you can use to access a BPMN process.

20.2 Communicating With Other BPMN Processes and Services Using Message Events

Message events enable you to communicate with the other BPMN processes and services in your project. You can use message events to: ■ Invoke an asynchronous service.