We have a setup where we have multiple process definitions deployed on the same process engine.
These processes are having many steps of type External task mostly.
Now our requirement is like we want asynchronous communication in External Task.
For Example - External task name validateCredentials can give response after an undefined time for the processInstance. But as the external task requires a lock duration which makes its behavior synchronous.
So I had tried for a bigger lock duration in external Task. But that is failing as service response time is not in my hand.
So I am trying for an additional step ReceiveTask type in my process which will get triggered when an external task service response is ready.
But Receive Task uses a messageName for triggering.
As the multiple process can have same external task and it’s next Receive Task is having different messageName, so it is hard for me to hard code messageName in my code.
Is there any suggestion for this problem?
Is there any best practice for asynchronus communication for external task?
Any example or code snippet will be highly appreciated.
Thanks in Advance.