sartography / SpiffWorkflow

A powerful workflow engine implemented in pure Python
GNU Lesser General Public License v3.0
1.69k stars 313 forks source link

Refactor event based gateways #419

Open essweine opened 4 months ago

essweine commented 4 months ago

Event based gateways currently do not work properly with timers.

The implementation is a complete hack. It would be better to restructure them the same way as was done for boundary events, so that the gateway actually occurs after the events in the task tree. The library's internal workings are premised on tasks having orderly transitions (eg, parent completes, child becomes ready or waits; parents should not wait on their children) but that's not how event based gateways work and it makes them unreliable.

This should be pretty easy to fix, except for the difficulty of working with our parser. So I'd like to put this off until https://github.com/sartography/SpiffWorkflow/issues/404 is complete (it's currently in progress).