Boundary Events not triggering inside user task

Hello Forum.
I’m facing an issue which I could not comprehend clearly, as to why I can only make this try catch with a Signal event to work and with the other types of events (Escalation, Message or Error) do not work

Could please someone clarify me, why what I’m trying to do, only works with the Signal Event? For example with Error or Escalation I get this:

ENGINE-02001 Execution with id ‘YYY’ throws an error event with errorCode ‘XXX’, but no catching boundary event was defined. Execution is ended (none end event semantics).

notes:

  • I have errorCodes the same in both sides (in the end event and boundary)
  • I want to change from signal to another type because with signal im affecting more processes than I intended…

Signals and errors work differently. A signal can be thrown and caught anywhere. While an error event “moves from the inside out”. The boundary event catches error events that are thrown by the user task. However, you throw the error in a different scope (the event subprocess).

You could solve this in different ways.

  1. The call activity and error handling could be encapsulated in a single subprocess, the error will then cancel the whole subprocess.
  2. Messages could work, but are not intended to be used in this way.
  3. Have you tried using a conditional boundary event? You can set a variable in the event subprocess which leads to a cancellation of the user task.
  4. Why do you need to have the indirection via the event subprocess? Can you attach the message event directly to the user task?

I hope this helps.