I found some frameworks for handling workflows:
- choose or build a class for State
- choose or build a class for Triggers
- create an object for a StateMachine<State,Trigger>
- initialization / get-set possibility to variables outside)
- configuring phase
- stateMachineObject.IsInState(stateItem)
- stateMachineObject.PermittedTriggers
- stateMachineObject.CanFire(triggerItem)
- stateMachineObject.Fire(triggerItem)
- stateMachineObject.FireAsync(triggerItem)
- stateMachineObject.Configure(stateItem)
- SubstateOf(stateItem) // Hierarchical State
- PermitReentry(Trigger)
- Permit(Trigger, State)
- PermitIf(Trigger, State, Guard)
- Ignore(Trigger)
- InternalTransition
- OnEntry(() => action());
- OnEntryAsync(async () => await action());
- OnEntryFrom(trigger, x => action()); // Parameterized Trigger
- OnExit(() => action());