views:

128

answers:

2

I am developing a State Machine Workflow using C# and WF in visual studio 2008. On one of my states I need to wait for multiple events to happen until the workflow can transition to the next state. As an example think of a unanimous voting scenario. I cannot find a way to do this. Does anyone have a solution or workaround for this problem?

+1  A: 

You can have multiple event driven activities within a state, so you could have handlers for each of the events you have and then set local booleans to track which has been executed successfully. After each, you could check the values and determine if you need to make a state change.

MattK
+1  A: 

A much more elegant solution would be to use the ParallelActivity: http://spellcoder.com/blogs/bashmohandes/archive/2006/10/02/690.aspx

dickeytk
Wow, nice article. Thats a real working solution. Also works for State Machine WF ;)
Igor Zelaya