paed01 / bpmn-engine

BPMN 2.0 execution engine. Open source javascript workflow engine.
MIT License
890 stars 167 forks source link

Resume process execution after error in decision gateway #194

Open Florian79 opened 6 days ago

Florian79 commented 6 days ago

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

paed01 commented 5 days ago

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.

Florian79 commented 4 hours ago

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

what do you think?

paed01 commented 4 hours ago

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

Florian79 commented 4 hours ago

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