比较BPEL流程中的多个速率-WSO2
我们使用ApacheODE/WSO2 BPS实现了一个BPEL流程(它涵盖了整个订单流程,因此我们有长期运行的流程) 我们从六家供应商处获得一些产品的价格,响应格式已经统一,每个响应包含5-10个产品。以下是一些示例回答: 供应商的回复1:比较BPEL流程中的多个速率-WSO2,wso2,wso2esb,bpel,apache-ode,Wso2,Wso2esb,Bpel,Apache Ode,我们使用ApacheODE/WSO2 BPS实现了一个BPEL流程(它涵盖了整个订单流程,因此我们有长期运行的流程) 我们从六家供应商处获得一些产品的价格,响应格式已经统一,每个响应包含5-10个产品。以下是一些示例回答: 供应商的回复1: <Products Vendor="1stVendor"> <Product> <Brand>Sony</Brand> <Model>M5<Model> <
<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>
<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>
<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>
索尼
M5
800
戴尔
B6
900
供应商的回复2:
<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>
<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>
<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>
索尼
M5
720
戴尔
B6
950
国际商用机器公司
H9
940
现在我们需要比较每种产品的价格,找到每种产品最便宜的价格,并返回最佳选项作为最终响应。对于上述示例,应如下所示:
最终回复:
<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>
<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>
<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>
索尼
M5
720
戴尔
B6
900
国际商用机器公司
H9
940
关于上述细节:
1-实现这一目标的最佳和最快方法是什么
2-使用Drools或WSO2 BRS等规则引擎来比较这些价格有意义吗?如果是,我们应该将所有响应合并为一条消息并传递给BRS,还是必须单独发送消息
谢谢。这里也解释了类似的情况 谢谢 蒂里尼