Hi,
Firstly, I'm quite new to WF... 3 weeks using it. Steep learning curve....
I've searched all over but cant seem to find a solution.
The problem i'm having is my StateMachine is not firing off the Delay event correctly.
I created a StateMachine workflow and published it as a webservice. This works great with webservice calls etc and changes through all the states just fine. The workflow models a basic bug tracking service.
When the state changes to Open, there is a delay event set to fire up after 5 minutes. The event fires off an e-mail and changes the state to escalated. This works fine, if you keep calling functions exposed by the web service e.g. CheckCurrentState().
The StateMachine also does persistence correctly without any hassles.
The delay event doesnt get fired off if you set the state to open and then leave your browser idle.
I've tried with the persistence service set to unloadonidle set to true and false, doesnt make a different.
I gather the runtime hosting the workflow is being created when the webservice is called and then disposed of when finished... is there any way to keep this runtime alive
The webservice is running in under IIS on my local box (Win XP)
Any help greatly appreciated!!

StateMachine Webservice Runtime
micha12
Joannes Vermorel - MSP
When a workflow is published as a webservice, it is configured to use the ManualWorkflowSchedulerService. When the ManualWorkflowSchedulerServiceis used, it means that the host must explicitly donate the thread on which the workflow is to run by calling RunWorkflow. This is done automatically for you, but when a delay is executed, control goes back to the host. When the delay expires, there is no-one to call RunWorkflow on the idle workflow and so it does not resume. However, there is a setting for ManualSchedulerService called ActiveTimers, that when set to true, weill automatically resume execution of the workflow. In normal code you would specify this in the constructor, like this: