Databases Reference
In-Depth Information
Creating a proxy process
At this point, you may be thinking that all of this may be too complex. However, the
solution is rather straightforward and that is to use a proxy process, which supports
the same operations as the Auction process, as illustrated in the following diagram:
With this approach, the client invokes either the initateAuction or submitBid
operation on the AuctionProxy process, which forwards the request to the Auction
process. The Auction process then returns the result to the AuctionProxy , which
then returns it to the original client.
This not only solves the problem of having a fixed reply to address, but has the
additional benefit of shielding the client from having to use correlation sets, as
it can use WS-Addressing to communicate with the proxy.
At this point, you may be thinking, why not use a Mediator as a proxy?
While using a Mediator would allow us to address the issue of having
a fixed reply to address, it doesn't address the correlation issue, as
Mediators don't support the concept of correlation sets.
Using the pick activity
Our proxy process needs to support both operations, initateAuction and
submitBid , as either operation can be used to initiate an instance of the proxy
process. To achieve this we will use the <pick> activity at the start of our process
in place of a <receive> activity.
A <pick> activity is similar to a <receive> activity. The difference is that with a
<pick> activity, you can specify that the process waits for one of a set of events.
Events can either be the receipt of a message or an alarm event (which we look at
later in this chapter).
Each message is specified in a separate <onMessage> branch, with each branch
containing one or more activities to be executed on receipt of the corresponding
message. To use a Pick activity, drag a <pick> activity from the Process Activities
list of the Component Palette on to your process.
 
Search WWH ::




Custom Search