views:

143

answers:

1

Using visual studio 2010 RC/.Net 4.0

I have a wcf workflow service with three receive activities defined, basically StartProcessing, StopProcessing, and GetProcessingStatus. This is a long running service that continues to poll an external service for data once StartProcessing is called, until StopProcessing is called.

My problem is with figuring out how to use correlation to ensure that all calls into the service call the same instance of the workflow. I am trying to avoid requiring any sort of instance id be required to be passed back in to subsequent calls to the service. In a nutshell, I would like the workflow being executed to be a singleton, and ensure that all receive activities operate on the same instance. How do I go about doing this?

A: 

I think that what you want is impossible, you need to correlate, WWF does not know how to execute it. If two parallel calls are received they will use the same object with unexpected results.

In wcf it could be possible, you can set a session in the client or you could manage wcf object creation, but in WWF I think you even don't have that options.

Pablo Castilla
No way you can think of to correlate internally? Does correlation have to correlate on data in the request? I was trying to figure out a way to initialize correlation to some initial value, and correlate all receive activities on that...but haven't had any luck.
BCarter
I think it must be in the request because it is when the workflow is instantiated, it must now which catch from ddbb.
Pablo Castilla