开发者

WF4: How to setup a workflow to receive multiple messages

开发者 https://www.devze.com 2023-03-08 00:23 出处:网络
I want a workflow, which can receive multiple of the same message from a MSMQ. Example: Receive: CreateWorkflow (CanCreateInstance=True)

I want a workflow, which can receive multiple of the same message from a MSMQ.

Example:

Receive: CreateWorkflow (CanCreateInstance=True)
Do Something...
Parallel (CompletionCondition=ExitParallel)
    Parallel Branch 1
        Receive: Update (CanCreateInstance=False, Use correlation)
        Process...
    Parallel Branch 2
        Receive: Finish (CanCreateInstance=False, Use correlation)
        Set ExitParallel=True

I would like to have my workflow be able to receive multiple Update messages. However, in this setup, it can only receive 1. According to this MSDN post, this should work, but I never got this to work.

Is the solution开发者_高级运维 to put an infinite while loop in Parallel Branch 1? Is there another way?


In order to receive multiple update messages you will have to put that receive in a loop. The way you set it up right now the update is allowed once and the Parallel only waits for the second branch, with the Finish, to complete.

0

精彩评论

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