Problem
Design a configurable workflow / approval engine using appropriate design patterns.
Requirements
- Define workflows as states, transitions, and actions.
- Provide a builder to construct a workflow and a factory for action handlers.
- Execute a workflow and persist its state across steps.
Areas to design
- The state-machine model (states, guarded transitions, actions on transition).
- Which design patterns earn their keep (Builder, Factory, State) and where they'd over-engineer.
- Extensibility for adding new action types without editing the engine core.