Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

State Machine or Flowchart for Windows Workflow Foundation 4?

We currently have a system that handles translation jobs.

  1. customer creates an order
  2. the project manager hands it over to one or more translator
  3. then it goes to a proofreader
  4. language manager checks quality, if bad, job goes back to translator
  5. project manager delivers it to client

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...

like image 803
Remy Avatar asked May 04 '12 12:05

Remy


People also ask

What is the difference between state machine and workflow?

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.

What is a state machine workflow?

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.

Is state machine a flowchart?

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.

What is state machine workflow in Sharepoint?

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.


1 Answers

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.

like image 176
Maurice Avatar answered Oct 07 '22 10:10

Maurice