G
Guest
I've added 2 tracking services to the wf runtime; one is the standard
SqlTrackingService:
trackingService = new
SqlTrackingService(<trackingConnectionString>);
<workflow Runtime>.AddService(trackingService);
trackingService.IsTransactional = false;
trackingService.UseDefaultProfile = true;
This works just fine.
The other provides an "in memory" tracking service/channel which doesn't
save anything to any permanent store.
<workflow Runtime>.AddService(new
NonPersistentTrackingService(this));
This specifies it's own in memory tracking profile. It passes on any
workflow/activity tracking events, that it gets from the workflow runtime, to
a client app (by publishing events that the client subscribes to).
This works just fine when I start workflows "from the beginning" - i.e. with
this method:
<Workflow Runtime>.CreateWorkflow(<workflow Type>).Start();
The GetProfile()/TryGetProfile(), GetTrackingChannel() and Send() methods
all get called as expected.
However, if a previously passivated workflow (that had been previously
Suspended/Delayed) is loaded into a new workflow runtime, the following
happens:
1. The Workflow runtime events all work as expected (WorkflowLoaded,
WorkflowResumed, WorkflowSuspended etc ...)
2. The SqlTrackingService works as expected - when the Delay Timer
expires/workflow is Resumed, it carries on recording all the subsequent
workflow/activity events.
3. BUT The custom tracking service does nothing! It IS started (I verified
this by invoking the Start() method that it inherits from it's base
WorkflowRuntimeService class - this throws a "service already started"
exception). But the workflow runtime doesn't call it's
GetProfile()/TryGetProfile(), GetTrackingChannel() or Send() methods.
When passivated workflows are loaded into a new runtime, the "out of the
box" SqlTrackingService presumably does something to force the workflow
runtime to call it's GetProfile()/TryGetProfile(), GetTrackingChannel() and
Send() methods.
How do I get my custom tracking service to do the same??
Any help would be greatly appreciated.
SqlTrackingService:
trackingService = new
SqlTrackingService(<trackingConnectionString>);
<workflow Runtime>.AddService(trackingService);
trackingService.IsTransactional = false;
trackingService.UseDefaultProfile = true;
This works just fine.
The other provides an "in memory" tracking service/channel which doesn't
save anything to any permanent store.
<workflow Runtime>.AddService(new
NonPersistentTrackingService(this));
This specifies it's own in memory tracking profile. It passes on any
workflow/activity tracking events, that it gets from the workflow runtime, to
a client app (by publishing events that the client subscribes to).
This works just fine when I start workflows "from the beginning" - i.e. with
this method:
<Workflow Runtime>.CreateWorkflow(<workflow Type>).Start();
The GetProfile()/TryGetProfile(), GetTrackingChannel() and Send() methods
all get called as expected.
However, if a previously passivated workflow (that had been previously
Suspended/Delayed) is loaded into a new workflow runtime, the following
happens:
1. The Workflow runtime events all work as expected (WorkflowLoaded,
WorkflowResumed, WorkflowSuspended etc ...)
2. The SqlTrackingService works as expected - when the Delay Timer
expires/workflow is Resumed, it carries on recording all the subsequent
workflow/activity events.
3. BUT The custom tracking service does nothing! It IS started (I verified
this by invoking the Start() method that it inherits from it's base
WorkflowRuntimeService class - this throws a "service already started"
exception). But the workflow runtime doesn't call it's
GetProfile()/TryGetProfile(), GetTrackingChannel() or Send() methods.
When passivated workflows are loaded into a new runtime, the "out of the
box" SqlTrackingService presumably does something to force the workflow
runtime to call it's GetProfile()/TryGetProfile(), GetTrackingChannel() and
Send() methods.
How do I get my custom tracking service to do the same??
Any help would be greatly appreciated.