deliveryperson

I have a simple statemachine for prototyping purposes.
In it, I've created a concrete implementation of my svc interface.Inside this concrete class I have a void "OnEvent" which accepts a Guid (which it passes on) and an interface that I created to house my event args to the events that would be raised to the workflow.

I'm calling CreateWorkflow without the Dictionary<string,object> named parameters collection as I didn't want to declare public fields or properties to map to these named args.

What I can't seem to get my head wrapped around is how to configure the tracking profile in such a way that it tracks my event args. Short of have to use TrackData - which I don't want to use in this particular case - is there any way I can achieve this within the .NET framework 3.0 ver

In a nutshell, this is how the concrete implementation of my service interface looks like:

Code Block

class concreteSvcImpl : IMyService
{
public void DoSomething(Guid guid, IMyEventArg eventArg)
public event EventHandler<ExternalDataEventArgs> SomethingHappened;
}


How can I set up a tracking profile so that eventArg's state is persisted when I raise the event Is it possible I tried using the tracking profile designer and drilled down to the eventdrivenactivity to set it up for tracking to no avail.

Any thoughts on this appreciated. Thanks in advance!

PS: I have no issues setting up the two services (sqlworkflowpersistence and sqltrackingservice) and can currently successfully track members declared as public within my workflow class quite easily when I pass them in using the generic dictionary overload on CreateWorkflow method.


Re: Windows Workflow Foundation EventDrivenActivity args and tracking

Tom Lake - MSFT

You need to create a workflow level variable for the ExternalDataEventArgs, take a look at the sample at http://blogs.msdn.com/tomlake/archive/2006/05/17/examples-of-using-persistence-and-tracking-in-asp-net.aspx.






Re: Windows Workflow Foundation EventDrivenActivity args and tracking

deliveryperson

Hi Tom

I appreciate you taking the time to answer my question. I do however feel that I either do not fully understand your reply or I have not clearly stated my requirement.

When you say: "You need to create a workflow level variable ..."
I'm thinking
"... members declared as public within my workflow class ..." (which I included in my question as part of the PS)

So, essentially what I meant to say is: I want to know if there's a way to track my event args passed as part of the event I raise to a workflow without having to create a workflow level variable.

Is it possible

Thanks in advance.

Craig




Re: Windows Workflow Foundation EventDrivenActivity args and tracking

Tom Lake - MSFT

No, there is not way to track your event args without creating a workflow level variable.