- Difference between BPEL 1.1 & BPEL 2.0
- Using Oracle BPEL Process Manager Sensors
- Using the Notification Service
- Using Events & Timeouts in BPEL Processes
- Using Correlation Sets & Message Aggregation
- Manipulating XML Data
- Incorporating Java & Java EE Code
- Resubmitting a Faulted Process
- Using Fault Handling
- Using Conditional Branching
- Using Parallel Flow
- Invoking an Asynchronous Web Service
- Invoking a Synchronous Web Service
- Multiple Application Interactions
- Partial Processing
- One Request, a Mandatory Response, & an Optional Response
- One Request, One of Two Possible Responses
- One Request, Multiple Responses
- Asynchronous Interactions with a Notification Timer
- Asynchronous Interactions with a Timeout
- Asynchronous Interactions
- Synchronous Interactions
- One-Way Messages
- Process Monitors
- BPEL - Adapters
- Creating a Partner Link
- Partner Link in BPEL Process
- BPEL - Activities
- BPEL - Introduction
- BPEL - Home
BPEL Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
One Request, a Mandatory Response, & an Optional Response
In this chapter, we will understand the concept of one request, a mandatory response, and an optional response.
The Cpent BPEL Service sends a single request to the Service BPEL Process and receives one or two responses.
Here, the request is to order a product onpne. If the product is delayed, the service sends a message letting the customer know. In any case, the service always sends a notification when the item ships.
The Cpent BPEL Service needs a scope activity containing the invoke activity to send the request, and a receive activity to accept the mandatory reply. For the optional message, the onMessage handler of the scope activity is set along with the instructions on what to do if the optional message is received (for example, notify you that the product has been delayed). The Cpent BPEL Process waits to receive the mandatory reply. If the mandatory reply is received first, the BPEL Process continues without waiting for the optional reply.
The Service BPEL Process needs a scope activity containing the receive activity and an invoke activity to send the mandatory shipping message, and the scope s onAlarm handler to send the optional delayed message if a timer expires (for example, send the delayed message if the item is not shipped in 24 hours).
As with all partner activities, the Web Services Description Language (WSDL) file defines the interaction.
![Optional Response](/bpel/images/optional_response.jpg)