posted on Monday, July 17, 2006 7:40 PM
by
BayerWhite
Recursive Composition
The Tampa Code Camp last weekend was fun, however I had many questions concerning Recursive Composition from the second session I did on human workflows. Here is the low down...
Sometimes multiple states need to use the same event. If you look at the model used in my previous blog, there are two states, "WashingBay" and "WorkOnAutomobile". These states need the same event to process payment once either them has been completed. Instead of adding a "ProcessPayment" event to each state, it makes more sense to allow each state the ability to inherit the event from a parent state. This is a two step process.
1. Add a new state to the machine state workflow, and give it a name that generalizes what child events it may contain.
2. Add an event to the new state that needs to be inherited from other states.
At this point, any states that need to inherit the event from the state can simply be dragged and dropped within the parent state. Once this is done correctly, each state will be readily seen as children of the parent event. Once each child state is active, they will able to inherit the event from the parent state.