简体   繁体   English

Windows Workflow Foundation 3在并行活动中等待

[英]Windows Workflow Foundation 3 wait inside parallel activity

I have a workflow where the order of execution for the activities is: 我有一个工作流程,其中活动的执行顺序为:

  • codeActivity1 codeActivity1

  • codeActivity2 codeActivity2

  • codeActivity3 codeActivity3

  • codeActivity4 codeActivity4

  • codeActivity5 codeActivity5

  • codeActivity6 codeActivity6

  • codeActivity8 codeActivity8

  • codeActivity7 codeActivity7

The rule which wwf uses is obviously that activities of each branch get executed in turns. wwf使用的规则显然是每个分支的活动轮流执行。 This is ok for me for most of my activities with one exception: I have one activity in the first branch that needs to execute before the activities of second branch. 对于我的大多数活动,这对我来说都是可以的,但有一个例外:我在第一个分支中有一个活动,需要在第二个分支的活动之前执行。 I know I can just put the activities of the second branch before this one activity, but that would make my existing workflows harder to understand. 我知道我可以将第二个分支的活动放在该活动之前,但这会使我现有的工作流程更难以理解。 Each branch has activities which work on some areas of my application. 每个分支都有在我的应用程序的某些区域中起作用的活动。

I am looking for some kind of "waiting activity" that does not execute until some condition is met. 我正在寻找某种“等待活动”,直到满足某些条件后才执行。 The important part is that id does not pause the current thread, because that would not allow the activities of the first branch to continue. 重要的是id不会暂停当前线程,因为这将不允许第一个分支的活动继续进行。

在此处输入图片说明

如果我正确理解,我将使用While活动或ConditionedActivityGroup活动,它们可以等到满足某些条件后再继续。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM