RunWorkflow being called on get_UserData()

Topics: Web Client Software Factory
Mar 16, 2007 at 1:06 PM
I was walking through the call stack using the reference implementation provided with the WCSF, and I noticed that when you call the method EFTPageFlow.UserData"key" you ultimately end up inside a method in WorkflowFoundationPageFlowState which calls scheduler.RunWorkflow(_instance.InstanceId);

Does this mean that everytime you use Userdata there is the "hit" starting up a new instance of workflow on the current thread, or is the RunWorkflow method in the ManualWorkflowSchedulerService class smarter than that.

Mar 29, 2007 at 6:11 PM
Edited Mar 29, 2007 at 6:11 PM
Hi, SilverStirling

The RunWorkflow method does not start new instance of the workflow, it executes the existing instance whose GUID is the one you pass as a parameter.

Basically when using the ManualWorkflowSchedulerService you have to call the RunWorkflow method to make it do some work. For example, if you raise events to a workflow, you need to call the RunWorkflow after you raise the events to get the workflow up and have it handle the events.

The manual scheduling service is used to execute workflows synchronously.
Take a look at this article for more information about the ManualWorkflowSchedulerService:

Let me know if this helps,
Ezequiel Jadib