Download Developing Business Processes with Oracle Business Process

Transcript
Using the Send and Receive Tasks to Communicate Between Processes
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 Business Process Management (Oracle BPM) application.
Figure 18-1 outlines the basic behavior when using send and receive tasks to invoke a
process and receive a response.
Figure 18-1
Processes
Using the Send and Receive Tasks to Communicate Between
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 Starting a
Process with the Receive Task..
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
communication between the two processes.
Communicating with Other Processes and Services 18-3