开发者

Workflow services correlation

I would like to implement next workflow scenario:

Workflow services correlation

I have workflow service with two branches. Operation2 (Receive activity) is correlated with CorrelationHandle “handle2” which is initialized from message header.

Workflow services correlation

The flow is next:

1) Someone calls Operation1 and it initializes correlation handler for Operation2. So the case is that correlation value for Operation2 is not the same as for Operation1 and should be obtained in runtime when execution Operation1.

2) Using correlation value client may call Operation2.

3) If correlation is not correct Operation2 should still be executed but with custom logic.

The problem is when I call the first service I get an exception:

The CorrelationHandle is already in use with BookmarkScope '{bookmark scope id x} ', so it cannot be used with BookmarkScope '{bookmark scope id y}'

Debugging shows that even if I call Operation1 only “handle2” from Operation2 is also initializ开发者_JAVA技巧ed with some value in Receive2 activity!!! so I it seems I cannot re-initialize it.

Any ideas how it can be fixed?

UPDATE:

I have attached file with source code so you may reproduce the issue. Just launch Operation1.

http://dl.dropbox.com/u/27847776/WorkflowCorrelation.zip

Thanks beforehand,

-Petro


In my experience you cannot re-initialize a correlation handle. You would need to create a separate correlation handle for each key you want to correlate on.


Do't use Pick. Use Parallel and set the parallel to terminate only when you are sure the conversation has ended. The Parallel has a property where you can set the terminate condition.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜