Modeling an Async Process BPEL
The example below is non-normative and represents one of several possible approaches that may be used.
Asynchronous service operations involve two in-only WSDL operations (a request-response combination.). WS-BPEL defines an <invoke> activity to consume an in-only operation. A <receive> and <pick> <onMessage constrct can be used for the in-only operation. The <pick> activity waits for the occurrence of exactly one event from a set of events, then executes the activity associated with that event. The <onMessage> is similar to a <receive> activity, in that it waits for the receipt of an inbound message.
When designing a business process that incorporates asynchronous web service interactions, the following constructs should be used:
· Use partnerLinks for external Web services
· Use variables to store data to be exchanged or transformed between Web services
· Use an invoke activity to consume a service
· Use a receive activity to provide a service
· Use a pick with an OnMessage construct for the asynchronous response
· Use a pick with an OnAlarm construct for a response timeout
Use a correlation identifier to uniquely identify the process and data instance (usually constructed from the data being processed – such as an OrderID combined with a ProductID) .