CrumpetDev / crumpet

GNU Affero General Public License v3.0
18 stars 1 forks source link

Setup flow engine #22

Closed tomtitherington closed 6 months ago

tomtitherington commented 9 months ago

Background & Context*

Set up the "Flow Engine", which manages the overall coordination of a flow. It determines the order in which steps are executed (in the case of auto-transition types), handles transitions between steps, and so on. The FlowEngine should operate on a single FlowInstance object, which is supplied at initialization or when calling a static/class method.

Goal*

Implementation Details*

Might be an idea to use a singleton pattern here or use a static class if we don't need to track state. However, if this complicates things then just create a FlowEngine instance each time a Flowinstance needs to be operated upon (i.e. execute a transition).

Acceptance Criteria*

Additional Information

I don't think it's worth implementing Celery at the moment. I think we should introduce this when users can define "actions" within steps. Only steps with actions should be then passed to a Celery worker.

*required field.