开发者

WCF Workflow Service single instance correlation

开发者 https://www.devze.com 2022-12-22 13:28 出处:网络
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 se

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 n开发者_运维知识库utshell, 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?


You can correlate on a constant for example. Edit the XPath in query correlation to return the number 1 for example.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号