Hello, I'm a beginner with WF, but I've read a book and done a lot of googling. I want to write an inventory management service. The inventory is made up of individual items which have a state:
- Spare
- Installed
- In-Repair
Items may spend months in each state, and there are thousands of items.
The question is, do I create a state machine workflow for all the different states? Or do I create workflows for transitioning between states?
If I understand correctly, if I create a single state machine workflow, then there will always be a workflow running for every item. This means thousands of ever-running workflows. Also, I need to be able to display a snapshot of the status of each item, so that means I have to somehow query all the workflows for the state they are currently in, or otherwise persist to a database after each state transition.
However, a state-machine workflow logically sounds like the right thing to do, hence my dilemma.
Please help me if you can :-)
Thanks!
Update:
Assume I have more states than the above 3, and that not all state transitions are possible.
Bounty Winner: Maurice - Thanks to everyone else for really helping me understand more about workflows, the MS workflow foundation, and other more lightweight alternatives. Unfortunately, there can only be one bounty winner, and Maurice's answer along with its comments helped me the most.