Message correlation retention

Hi,
In my process I am making requests to a service on throw message events and handling callbacks with a catch message event. Unfortunately sometimes the callback triggers a message before I’ve completed the request task.

I was wondering if there was any way of retaining messages that are not correlated (presumably with a timeout)?

Or should I solve this in some other way? What would be a natural bpmn solution?

Instead of using a send and receive you could use an external task. It would have same functionality but it would be contained in a single symbol.

Other than that you could solve it by modeling your process so that you wait for the message to come back before you send it. Something like this would work:


Make sure you tick the async before box on the send event to ensure the commit happens before the message is sent.

2 Likes

Thank you, Niall, this is great info.

I will probably end up using an external task, though it feels a bit like I’m losing out on the natural fit of catching messages to push notifications.

I also considered parallel gates like this, and am using a similar solution for a slightly different use case where it feels more natural. I do think it adds too much visual/cognitive noise to the process, but it is great to know it is an option.

I was also worried about the concurrency aspects of it, but your tip about the continuation checkbox was interesting. I must admit though, I have read Transactions in Processes a few times and still don’t feel like I have a good understanding of the material and when to use these checkboxes…

Do you think you could point out some better reading material about these properties and transactions?

I agree, i think external tasks is the right way to go.
This post is quite old but it’s still reverent, i hope it helps.

1 Like