byrokrat/giroapp

Validate donor state transitions using a state machine

hanneskod opened this issue · 1 comments

As there is now there are many complicated buisiness rules as regards to what state can be entered where spred out in different parts of the code.

For example in PauseCommand donor state is inspected to see if donor can be paused.

This logic needs to be centralized. What if we want to allow for new state transitions, we would then have to do multiple and error prone edits..

See the symfony workflow component. As that could be a starting point..