Hello Camunda World,
I am trying to figure how to make following happen.
My flow calls service A and that service is async so will do callback at some point.
I want to ensure that my process always listens for it even if it’s blocked in user task, e.g. in case when callback kind of times-out and comes when e.g. process is blocked in user task.
I have design as below… it’s great for happy path. Process receives message - it’s an interrupting even, status in callback field matches expected result. Amazing… but as in every story, this would be too simple. There is also unhappy path of the callback - my process receives the callback but the status field in callback is not matching expected value. In that situation I would love to retry the “main” process that would call again service A …
Would you have recommendations on how to go about it?
Hi,
Heres an alternate model, there are a few different ways to model this, this one is just the first approach which comes t mind…
Note with this one, there is a chance you could get a delayed response after the timer event - hence you may need to think about a stale response due to the retry if applicable…
regards
Rob
Thanks for Rob for the reply. The design you are proposing is what my current process looks like, I am trying to change and posted design is what I am aiming for.
Drawbacks of the design you shared that uses message gateway approach:
- callback arrives between service task and message gateway and there is no one waiting for message yet
- when process times out and e.g. blocks in Manual Troubleshoot step but callback arrives … again no-one listens for it and callback is lost
forum2.bpmn (14.8 KB)
Hi,
yes you are right in that if the timer goes off, a late response will not be acknowledged. If thats what you want, this next model is closer…
regards
Rob
1 Like