- BPEL Tutorial
- BPEL - Home
- BPEL - Introduction
- BPEL - Activities
- Partner Link in BPEL Process
- Creating a Partner Link
- BPEL - Adapters
- Process Monitors
- One-Way Messages
- Synchronous Interactions
- Asynchronous Interactions
- Asynchronous Interactions with a Timeout
- Asynchronous Interactions with a Notification Timer
- One Request, Multiple Responses
- One Request, One of Two Possible Responses
- One Request, a Mandatory Response, & an Optional Response
- Partial Processing
- Multiple Application Interactions
- Invoking a Synchronous Web Service
- Invoking an Asynchronous Web Service
- Using Parallel Flow
- Using Conditional Branching
- Using Fault Handling
- Resubmitting a Faulted Process
- Incorporating Java & Java EE Code
- Manipulating XML Data
- Using Correlation Sets & Message Aggregation
- Using Events & Timeouts in BPEL Processes
- Using the Notification Service
- Using Oracle BPEL Process Manager Sensors
- Difference between BPEL 1.1 & BPEL 2.0
- BPEL Useful Resources
- BPEL - Quick Guide
- BPEL - Useful Resources
- BPEL - Discussion
Using Events & Timeouts in BPEL Processes
Asynchronous web services usually take a long time to return a response and as such, a BPEL process service component must be able to time out, or give up waiting, and continue with the rest of the flow after a certain amount of time. You can use the pick activity to configure a BPEL flow either to wait over a specified amount of time or to continue performing its duties. To set an expiration period for the time, you can use the wait activity. To manage message, events can be used particularly when the business process is waiting for callbacks from partner Web services.
Events
BPEL supports two types of events −
Message Events
These events are triggered by incoming messages through operation invocation on port types.
Alarm Events
These events are time-related and are triggered either after a certain duration or at a specific time.
Often, however, it is more useful to wait for more than one message, of which only one will occur.
Alarm events are useful when you want the process to wait for a callback for a certain period of time, such as 15 minutes.
If no callback is received, the process flow continues as designed.
Useful in loosely coupled service-oriented architectures, where you cannot rely on Web services being available all the time.
Pick Activity
The pick activity has 2 branches −
onMessage − the code on this branch is equal to the code for receiving a response before a timeout was added.
onAlarm − this condition has code for a timeout of one minute.
Wait Activity
The wait activity allows a process to wait for a given time period or until a time limit has been reached. Exactly one of the expiration criteria must be specified.