简体   繁体   English

WSO2 BPS BPEL重用异步过程

[英]WSO2 BPS BPEL reusing the async processes

Having WSO2 BPS 3.6.0 we have several long running asynchronous processes. 有了WSO2 BPS 3.6.0,我们有几个长时间运行的异步进程。 I'd like to reuse a process in multiple other processes (eg error handling, common procedures, ..). 我想在多个其他进程(例如错误处理,通用过程等)中重用一个进程。

The problem is, that in that case multiple processes will expose the same callback service: 问题在于,在这种情况下,多个进程将公开相同的回调服务:

ERROR {org.wso2.carbon.bpel.core.ode.integration.store.TenantProcessStoreImpl} -  Service: {http://xxx/bps/xxx}XXCallback already used by another process. Try again with a different service name

How do I listen to the callback response from multiple processes? 如何侦听来自多个进程的回调响应? (assume I could provide correlation so the right instance is invoked) (假设我可以提供相关性,以便调用正确的实例)

I am considering to provider a little bit different service name (url fragment?) for each parent process (even exposing the same port) and use the ReplyTo header to force the correct callback url. 我正在考虑为每个父进程提供一点不同的服务名称(URL片段?)(甚至公开相同的端口),并使用ReplyTo标头强制使用正确的回调URL。 I am still not sure if it's a correct approach. 我仍然不确定这是否是正确的方法。

Process1 & Process2 invoke the CommonProcess asynchrnously. Process1和Process2异步调用CommonProcess。

Process1 & Process2 should implement the operation defined in Callback.wsdl Process1和Process2应该实现Callback.wsdl中定义的操作

CommonProcess will invoke the operation defined in Callback.wsdl to intimate Process1/Process2. CommonProcess将调用Callback.wsdl中定义的操作来关联Process1 / Process2。

ProcessPackage1 ProcessPackage1

  • Process1.bpel 进程1
  • Process1.wsdl 进程1.wsdl
  • CommonProcess.wsdl CommonProcess.wsdl
  • Callback.wsdl Callback.wsdl

ProcessPackage2 ProcessPackage2

  • Process2.bpel 进程2
  • Process2.wsdl Process2.wsdl
  • CommonProcess.wsdl CommonProcess.wsdl
  • Callback.wsdl Callback.wsdl

CommonProcessPackage CommonProcessPackage

  • CommonProcess.bpel CommonProcess.bpel
  • CommonProcess.wsdl CommonProcess.wsdl
  • Callback.wsdl Callback.wsdl

How to pass the EPR of Process1 & Process2 to CommonProcess for the callback? 如何将Process1和Process2的EPR传递给CommonProcess进行回调?

This can be done with DynamicEndpoints. 这可以通过DynamicEndpoints完成。 The process EPR can be passed in the payload message during the invoke from Process1 or Process2 to CommonProcess. 可以在从Process1或Process2到CommonProcess的调用期间,在有效负载消息中传递流程EPR。 The CommonProcess will override the partnelink EPR that corresponds to Callback.wsdl with the EPR that has been passed with the incoming message. CommonProcess将使用与传入消息一起传递的EPR覆盖与Callback.wsdl对应的partnelink EPR。

Here is a sample that demonstrates playing around Partnerlink EPR. 这是一个示例,展示了围绕Partnerlink EPR进行的操作。

https://github.com/apache/ode/tree/ode-1.3.x/distro/src/examples-war/DynPartner https://github.com/apache/ode/tree/ode-1.3.x/distro/src/examples-war/DynPartner

This documents some more on that option: http://ode.apache.org/endpoint-references.html 本文档进一步介绍了该选项: http : //ode.apache.org/endpoint-references.html

Note: This is provided in Apache ODE, and might be available on WSO2. 注意:这在Apache ODE中提供,并且可能在WSO2上可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM