This seems like a simple problem: I have a WF4 activity that guides the user through a set of questions. After each question is displayed, the activity should be idled until the question is answered. After each question is answered, I want to prompt the user with the next question. (The next question is determined based on the answer to the previous question.)
To do this, I have a simple workflow activity that implements a Bookmark. I have a console app running the workflow using WorkflowApplication.Run, waiting for input, and then calling .ResumeBookmark.
What I need to do is to get the value of Current_Question_Text from the workflow when it becomes idle. I've set the WorkflowApplication.Idle property to a delegate and in that delegate, I'd like to get the text of the current question stored within the Activity. However, the output arguments are not available until the Completed method fires and the WorkflowApplicationIdleEventArgs don't provide any information about the current state of data.
I've also looked at the Activity and WorkflowApplication variables in the Idle delegate and cannot see any way to get to the data that way.
Is there anyway to get data values from the Activity while it is idle?
Thanks, David Burgett