I am new to WWF and have been working on a Finite State Machine workflow. One thing I don't understand is how I can share events between States. For example, I would like to support a cancel event in all states that simply terminates the workflow. All of the examples and the validation edits in the workflow editor imply that I must have a unique cancel event in every state. I have about 45 states with about 10 unique events but the only way I have been able to get this to compile and run is to set up hundreds of events,, which is going to take a very long time. Am I designing my workflow incorrectly


David Morris

Re: Windows Workflow Foundation Shared Events



Have a look on Keith Scott Allen's site - he's got a really nice treatment of State Machine workflows, including exactly the scenario that you want - you essentially need to add an EventDriven activity to the workflow itself, rather than a single State in the workflow.