In scenarios where operations are invoked using the request/response pattern, we always have a situation where an inbound message activity has to be related with a reply activity. The inbound message activity can be a
<receive>, <onMessage>, or
<onEvent>. The reply activity is always a
<reply>. In most cases, the BPEL engine will figure out itself which reply activity relates to which inbound message activity. However, if there can be more than one pair of inbound message activities (
<reply>, we have to explicitly mark the pairing relationship. We do this using message exchanges.
To use message exchanges, we first have to declare them. We declare message exchanges immediately after partner ...