bpmn-engine icon indicating copy to clipboard operation
bpmn-engine copied to clipboard

Resume process execution after error in decision gateway

Open Florian79 opened this issue 1 year ago • 1 comments

Hello,

first of all, i would like to say that bpmn-engine is a great libruary, which is now running stable on several instances - thank you very much for that!

image

However, we currently have the situation that with an inclusive gateway none of the expressions in the outgoing transitions is set to true and the process therefore appears to be trapped on the gateway. Is there a way to repeat the decision or to rewind the process one step? In our example, there is no parallel execution and only one execution token.

The execution context appears to have the status error, as follows:

image

The current process is somewhat more extensive and has been running for quite some time - we don't want to restart it, we want to rescue it somehow. do you have any ideas?

Thank you, Florian

Florian79 avatar Oct 22 '24 14:10 Florian79

Tricky. If you inspect state.definitions[0].execution.processes you will see that the broker is stopped. That means that the failed BPMN process has stopped completely and has no track of any of its children. I will dig a bit deeper but no promises.

paed01 avatar Oct 23 '24 04:10 paed01

OK I understand that this is a bit tricky. Is there a way to avoid such errors. e.g:

  • we could mark an outgoing transition as default, which is always taken if no expressions become true.
  • or we make the error catchable with a CatchErrorEvent

what do you think?

Florian79 avatar Oct 28 '24 12:10 Florian79

I would go for a default flow. Catch error event cannot be attached to a gateway, afaik.

paed01 avatar Oct 28 '24 12:10 paed01

That would be wonderful - terminating the process with an error status is not satisfying so far ;)

Florian79 avatar Oct 28 '24 12:10 Florian79

Any progress on this issue @Florian79?

paed01 avatar Dec 04 '24 05:12 paed01

@paed01 yes, to solve it with a default transition is okay for me as default transitions are already supported by bpmn-engine. so you can close this ticket.

Thank you so much! Florian

Florian79 avatar Jan 09 '25 08:01 Florian79