The Service Task in Context

6-18 Modeling and Implementation Guide for Oracle Business Process Management

6.4.4 Introduction to the Receive Task

In contrast to the send task, the receive task waits for a message from a system or process outside the current process. Once this message is received, the task is complete and running of the process continues to the next task in the process flow. Figure 6–21 shows the default notation for the receive task. Figure 6–21 The Receive Task The receive task is represented by blue rectangle with a yellow envelope in the middle. The envelope has an incoming arrow to represent the receive action. For information on implementing the send task to invoke a process or service, see Using Send and Receive Tasks to Define a Synchronous Operation in a BPMN Process in the Oracle Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management.

6.4.4.1 The Receive Task in Context

See Section 6.4.5, Using the Send and Receive Tasks to Communicate Between Processes for information on using the send and received tasks to communicate between processes.

6.4.4.2 Starting a Process with the Receive Task

You can use the receive task to trigger the start of a process. This is useful when you want to invoke a process from another process using a send task. To start a process using the receive task, the following conditions must be met: ■ The receive task is preceded by an none start event. ■ Your process does not contain any other start events. ■ The Create Instance property is enabled. The following section describes how to use the send and receive tasks to communicate between processes.

6.4.5 Using the Send and Receive Tasks to Communicate Between Processes

You can use the send and receive tasks to invoke another BPMN process and receive messages back from it. Processes that begin with a receive task and contain a send task are exposed as services that can be used by other process and services within an Oracle BPM application. Figure 6–22 outlines the basic behavior when using send and receive tasks to invoke a process and receive a response. Modeling Business Processes with Oracle BPM 6-19 Figure 6–22 Using the Send and Receive Tasks to Communicate Between Processes This illustration is described in the text. The following steps outline a possible scenario when using the send and receive tasks to communicate between processes. 1. Process A is invoked. 2. A token of Process A reaches the send task. 3. The send task invokes Process B. This is defined by the implementation for the send task. 4. The token of process A proceeds to the next flow object in the process. 5. The receive task initiates a process instance of Process B. The receive task must have the Create Instance property defined. See Section 6.4.4.2 . 6. The newly created token proceeds through process B. 7. Depending on the specific behavior of your process, the following scenarios may occur: a. If the token of Process A reaches a receive task paired with a send task from Process B, the token of process A waits until a response is received. After the response is received, the token of Process A continues to the next flow object. b. If the token of Process B reaches a send task paired with a receive task in Process A, Process B sends a response to Process A. The token of Process B continues to the next flow object. 8. Both processes continue running. You can use subsequent send and receive pairs to define subsequent communicate between the two processes.

6.4.6 Introduction to the Message Throw Event

The message throw event enables you to send a message to another process or service. Figure 6–23 shows the default notation for the message throw event. Figure 6–23 The Message Throw Event The message throw is represented by two concentric circles with a blue envelope in the middle.