简体   繁体   中英

WSO2 BPS BPEL reusing the async processes

Having WSO2 BPS 3.6.0 we have several long running asynchronous processes. 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. I am still not sure if it's a correct approach.

Process1 & Process2 invoke the CommonProcess asynchrnously.

Process1 & Process2 should implement the operation defined in Callback.wsdl

CommonProcess will invoke the operation defined in Callback.wsdl to intimate Process1/Process2.

ProcessPackage1

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

ProcessPackage2

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

CommonProcessPackage

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

How to pass the EPR of Process1 & Process2 to CommonProcess for the callback?

This can be done with DynamicEndpoints. The process EPR can be passed in the payload message during the invoke from Process1 or Process2 to CommonProcess. The CommonProcess will override the partnelink EPR that corresponds to Callback.wsdl with the EPR that has been passed with the incoming message.

Here is a sample that demonstrates playing around Partnerlink EPR.

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

Note: This is provided in Apache ODE, and might be available on WSO2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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