Hi, I've experimented with adding the SQL state, timer and tracking services to the Lab1 sample step 4 (the expense report approval workflow). The tracking service works fine, but it seems that the state and timer services get the engine stuck on the ListenForManagerApproval activity. If I disable the state and timer services the workflow unfolds as expected.
I use the (really cool) Workflow Monitor sample to view the results, and the progress is evident every time: With the state and/or timer service enabled, the flow gets stuck on ListenForManagerApproval and then after a while the workflow gets the status "aborted".
Any ideas why this happens The databases are perfectly OK and initialized using the provided scripts.

Problems with state persistence and timer services
ethan23m
private void StartWorkflowHost()
{
// Create a new Workflow Runtime
workflowRuntime = new WorkflowRuntime();
SqlStatePersistenceService statePersistence = new SqlStatePersistenceService(connstr);
workflowRuntime.AddService(statePersistence);
SqlTrackingService tracking = new SqlTrackingService(connstr);
workflowRuntime.AddService(tracking);
// Start the Workflow services
workflowRuntime.StartRuntime();
...
The tracking service works just fine, but the state service fails as described in previous posts. But good to hear that it works for you, then it's probably just something with my installation, and I'll try reinstalling at some later point. Thanks.
vonWinter
xPLaR
But thanks for the suggestion. Btw. the last activity (ListenForManagerApproval) is marked as Executing in the monitor.
Do the services work for you
dimwit
In Main(), add
workflowRuntime.WorkflowTerminated +=
new EventHandler<WorkflowTerminatedEventArgs>(workflowRuntime_WorkflowTerminated);...
and,
static
void workflowRuntime_WorkflowTerminated(object sender, WorkflowTerminatedEventArgs e){
Console.WriteLine(e.Reason);
}
Pgr
James Conard
Architect Evangelist - Windows Workflow Foundation
http://www.WindowsWorkflow.net
http://blogs.msdn.com/jamescon
Ravenbutterfly
SqlPersistence Service can be used with Sql2000, MSDE or SQLExpress. What is the problem you encountered using the service..
Thanks,
Srikanth.
HypeH
My environment: visual studio 2005 beta2, windows workflow foundation beta1, sql server 2000, windows xp professional.
is it for the sql server 2000
SanjayAgrawal
We did not hear from you for some time regarding the issue. Were you able to resolve it. If you still have problem do let us and we will be glad to help.
Thanks,
Srikanth.
Joccar
Btw. has anybody else encountered this problem
Fuhrer
mofo7
If the last activity is marked as executing and the workflow is aborted then most likely you do not have persistence service.Try adding the persistence service now and see if it works. The sample works fine for us.
Thanks,
Srikanth.
xrayb
BogN
HeHeHeHeHeHe
Thanks, Iza