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

Defining the Process Interface 21-1 21 Defining the Process Interface This chapter describes how to configure a BPMN process to expose it as a service for other processes or services to invoke it. Oracle BPM enables you to expose the flow objects in the BPMN process as process operations. Other BPMN processes and services can invoke these operations. This chapter includes the following sections: ■ Section 21.1, Defining the Process Interface ■ Section 21.2, Using Message Events to Define the BPMN Process Interface ■ Section 21.3, Using Message Events to Define Asynchronous Operations in a BPMN Processes ■ Section 21.4, Using Message Events to Define a Synchronous Operation in a BPMN Processes Interface ■ Section 21.5, Using Message Events with an Interface from the Business Catalog to Define Your Process Interface ■ Section 21.6, Defining the BPMN Process Interface Using Send and Receive Tasks ■ Section 21.7, Defining Asynchronous Processes Operations Using Send and Receive Tasks ■ Section 21.8, Using Send and Receive Tasks to Define a Synchronous Operation in a BPMN Process ■ Section 21.9, Using Send and Receive Tasks with an Interface from the Business Catalog to Define Your Process Interface ■ Section 21.10, Defining the Process Input and Output This chapter assumes that you are familiar with SOA Composites. For more information about SOA Composites see Oracle Fusion Middleware Developers Guide for Oracle SOA Suite.

21.1 Defining the Process Interface

The process interface is a group of operations a BPMN process exposes for other processes or services to use. The SOA Composite shows the BPMN process interface in the Exposed Services section. You must define an interface for your BPMN process if you want other processes and services to use it. The interface you define contains the operations other processes and services can invoke. Synchronous process operations define input and output arguments. 21-2 Modeling and Implementation Guide for Oracle Business Process Management When you define an asynchronous processes operation you must also define its corresponding callback operation. The asynchronous operation defines the input arguments and the callback operation defines the output arguments. You can define the process interface by defining operations in your BPMN Process or you can choose to use an existing interface from the business catalog. You can implement any of these options using message events or send and receive tasks.

21.2 Using Message Events to Define the BPMN Process Interface

The process interface contains the operations that other services and processes can invoke to interact with a BPMN process. These operations may be synchronous or asynchronous. You can define the process interface using message events or send and receive tasks. To expose an operation in a BPMN process you can use a message start or message catch event configured as initiators. These message events enable you to define if the operation is synchronous or asynchronous. They also enable you to define the process input. The process interface must always contain an operation that exposes the start event of a BPMN process. A process or service that invokes this BPMN process must always invoke the operation that corresponds to the start event before invoking any of the operations in the process. To define the process output, you must configure the message throw or message end event that continue the event that defines the operation. If the operation is asynchronous, then these events also define the callback operation. If an interface contains an asynchronous operation, then it must also define the callback operation that returns the result of this operation. See Section 21.2.1, Using Message Events to Define the Callback Interface for BPMN Processes for more information on how to define a callback operation in a BPMN Process. Figure 21–1 shows a BPMN process that exposes a message start message event in its interface. It also shows how the SOA Composite editor displays this operation.