Need to Trigger Event attached in task from another user task

I have a simple model where I have a user task (Logging) with a boundary message (EXCEPTION_MSG) attached. As the message is triggered, it flows to Exception user task. We have a requirement that from Exception user task, we shall be able to trigger ‘Cancelled’ boundary message attached to Logging task. But as I tried to do that, I’ve got the following error message: [Cannot correlate message ‘CANCEL_MSG’: No process definition or execution matches the parameters].

I suspect this is due to I tried to trigger an event that is attached to a task that is not active. Is it the cause? How should I model this to make it work?

Attached please find the BPMN model.

Many thanks in advance!

Jason
event-poc.bpmn (7.0 KB)

Hi @jchen5580,

you can correlate messages only to tasks where a token is waiting. That is the reason you get a mismachting message correlation exception.

You should model the further exception logic with sequence flows and gateways after your Exception user task.

Hope this helps, Ingo

Hi Ingo,
Thank you for your prompt reply.

I am not sure if we can model with sequence flows because the Cancel event shall be triggered from Exception task at any time, meaning without completion of Exception task. To meet the requirement, should I attach a boundary message on Exception task that leads back to Logging task so that any boundary messages (in the real project, we will have quite few) can be triggered as one API call (we plan to have an API layer on top of Camuna Java API to provide flexibility we need for the project)?

Thanks
Jason

Hi Ingo,

Can you please confirm if this is the best practice? if it’s not what it is?

Many thanks in advance.
Jason

Hi @jchen5580,

your process model should work as you designed it.

But before I continue, I would check if the attached boundary events have to interupt the task of if the tasks are completed and you can use a gateway. An exception of an exception looks suspicious to me.

A pattern I have seen in real projects is this:

Hope this helps, Ingo

Thank you Ingo for the reply. Checking task completion prior to firing event makes sense. I however failed to relate your model with the problem we tried to resolve, which is firing event attached to another user task. For the time being, per our unique requirement, I guess we will have to go with what we have designed, which seem to be working for us.

Many thanks,
Jason

Hi @jchen5580,

BPMN is ambigous and there are more than one way to model certain situations. Most important is to get a common modeling style in your team.

Of course, my model if different to your situation. It is a pattern where it makes sense to interrrupt the exception task (inspect timeout).

Hope this helps, Ingo