We currently have a system that handles translation jobs.
Currently all the status can be assigned manually and/or overridden. Meaning any step can be skipped or set back.
The app is a ASP.NET WebForms / MVC mix.
Now I would like to re-implement this with Windows Workflow Foundation. Would a State Machine make more sense than a Flowchart? I'm not really getting the advantage of the State Machine...
In general, the major difference between a workflow engine and a state machine lies in focus. In a workflow engine, transition to the next step occurs when a previous action is completed, whilst a state machine needs an external event that will cause branching to the next activity.
State machine workflows provide a modeling style with which you can model your workflow in an event-driven manner. A StateMachine activity contains the states and transitions that make up the logic of the state machine, and can be used anywhere an activity can be used.
State machines are better in describing a continously running mechanism (f.e. a robot). Flowcharts are better at describing a branching sequence of actions. State machines naturally encapsulate action groups, flowcharts don't.
The state machine construct uses Change State actions to set which state to run next. The actions in a state are repeated until a Change State action is encountered and all actions in the state have completed executing. Workflow execution does not move to the next state instantly when the Change State action is run.
Given the way you describe the job you are really switching between states. So using a state machine sounds the logical approach. However it would be perfectly possible to do this using a flow chart and that would certainly be easier to explain to business users.
Now the good thing is you can mix and match state machine and flow chart as needed/wanted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With