2

We have implemented a BPEL process using Apache ODE / WSO2 BPS (it covers the whole order process so we have long running processes).

We are getting prices for some products from six vendors, response formats are already unified and each response contains 5-10 products. Here's some sample responses:

Response from Vendor1:

<Products Vendor="1stVendor">
<Product>
    <Brand>Sony</Brand>
    <Model>M5<Model> 
    <Price>800.00<Price>
<Product>
<Product>
    <Brand>Dell</Brand>
    <Model>B6<Model> 
    <Price>900.00<Price>
<Product>

Response from Vendor2:

<Products Vendor="2ndVendor">
<Product>
    <Brand>Sony</Brand>
    <Model>M5<Model> 
    <Price>720.00<Price>
<Product>
<Product>
    <Brand>Dell</Brand>
    <Model>B6<Model> 
    <Price>950.00<Price>
<Product>
<Product>
    <Brand>IBM</Brand>
    <Model>H9<Model> 
    <Price>940.00<Price>
<Product>

Now we need to compare the prices for each product to find the cheapest price for each product and return the best options as the final response. For the above examples, it should look like this:

Final response:

<Products>
<Product CheapestVendor="2ndVendor">
    <Brand>Sony</Brand>
    <Model>M5<Model> 
    <Price>720.00<Price>
<Product>
<Product CheapestVendor="1stVendor">
    <Brand>Dell</Brand>
    <Model>B6<Model> 
    <Price>900.00<Price>
<Product>
<Product CheapestVendor="2ndVendor">
    <Brand>IBM</Brand>
    <Model>H9<Model> 
    <Price>940.00<Price>
<Product>

With regards to the above details:

1- What are the best and the fastest ways to achieve this?

2- Does it make sense to use a rule engine like Drools or WSO2 BRS to compare these prices? If yes, should we merge all responses into one message and pass to BRS or the messages have to be sent separately.

Thanks.

Community
  • 1
  • 1
centr
  • 645
  • 7
  • 15

1 Answers1

0

A similar kind of situation is explained here http://wso2.com/library/articles/2011/05/integrate-business-rules-bpel/

Thanks

Thilini

Thilini Ishaka
  • 953
  • 1
  • 8
  • 13