Databases Reference
In-Depth Information
Now that we have defined our Order Fulfillment task, the next step is to implement
our task-based business services that will act upon it. If we look at the type of
interactions that the user will have with our Order Fulfillment task, we can see that
they are split into two categories. The first are query-based tasks, and the second
are tasks that change the state of the workflow task. We will look at the query-based
tasks first.
Querying task instances
By analyzing our requirements, we can see that we need to support the following
query-based operations:
getSoldItems : Returns a list of all items sold by the specified seller and
provides details to those items which have an outstanding task assigned to
the seller
getPurchasedItems : Similar to the previous operation, but returns a list of
all items bought by the specified buyer
getOrderDetails : Returns detailed information about a specific order
It's worth noting that the first two operations are not just returning the current task
list for either the buyer or seller, but a complete list of all applicable items, regardless
of whether the task is currently assigned to the buyer or seller.
We are going to implement each of these operations as a separate BPEL process
within our OrderFulfillment composite. To do so, we will make use of the Task
Query Service provided by the Workflow Service. This provides a number of
methods for querying tasks based on a variety of search criteria including status,
keywords, attribute values, and so on.
Instead of implementing each of the operations as a BPEL process,
an alternative approach would be to perform the required
transformation in the proxy Mediator and route the request directly
to the Task Query Service .
The advantage of this approach is that it's more lightweight and
thus will be slightly more performant. However, the nature of the
XSLT that we would need for the transformation isn't supported by
the graphical mapping tool and thus would need to be handcoded.
So in the interests of maintainability, we have decided to use BPEL
and leverage the appropriate XPath within BPEL to perform the
transformation.
 
Search WWH ::




Custom Search