I am just starting with windows workflow 4.5. I am creating a simple console app. I am asking the user for data along the way. I followed some tutorials and I created some activities which ask the user for different data. Those Activities create bookMarks. How do I handle these multiple bookmarks in my host program. The tutorial had a loop and seemed to assumed that there would only be one bookmark. which looks like
WaitHandle[] handles = new WaitHandle[] { syncEvent, idleEvent };
while (WaitHandle.WaitAny(handles) != 0)
{
bool needsReview = false;
while (!needsReview)
{
var response = Console.ReadLine();
Boolean review;
if (response == "y")
{
needsReview = true;
review = true;
wfApp.ResumeBookmark("Review", review);
}
else if (response == "n")
{
needsReview = true;
review = false;
wfApp.ResumeBookmark("Review", review);
}
else
{
Console.WriteLine("Enter 'y' or 'n'");
}
}
}
How do I properly write this when I am dealing with many prompts to the user that have to handle information in different ways and resume different bookmarks.
If you are developing a console application, then it is a desktop application. So I assume there is one user, and one workflow working at a time. Is it possible that the workflow is stopped at different bookmarks? Am not sure what you mean in real life.
On any ways the bookmark name is a way to identify the different bookmarks, and you can also keep the bookmark object when you create one