Await for callback message and retry if message is wrong.

Hi!
I’m struggling with creating a BPMN process in a way that:

  1. I’m sending a message to do something in another service.
  2. I’m awaiting the callback message with information if the process passed correctly or not.
  3. If the message variable says ‘ok’ I’m moving to the next steps.
  4. If the message variable says ‘not ok’ then I’m retrying to send the message and await again for the callback message.
  5. Maximum I should do 3 tries and each time I should resend the message after: 1.send right away 2.await 3 minutes 3.await 30 minutes
    Any ideas what’s the best solution for that? I’m trying to move the biggest amount of logic to BPMN graph and not to the code itself.

image

I would probably do something like

2 Likes

Hello @GotnOGuts ,

I like your solution in general.

The only issue I see here is the two timer events.

I would go for 1 timer event and introduce a DMN table to map from retry# to waiting time.

That would be max visibility.

If the retry logic does not have to be that visible, you could also introduce an embedded mapping using an expression.

Jonathan

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.