Windows工作流程延迟问​​题

发布于 2024-08-20 09:15:39 字数 280 浏览 3 评论 0原文

我对工作流程很陌生,有一个问题。

我的设计器中有一个 While 循环来检查条件。

while 循环工作正常,条件检查工作正常。

我想做的是设置一个延迟,以便 while 循环仅每 x 秒/分钟检查一次条件。我已经尝试了 while 循环内的延迟控制,但由于某种原因,延迟活动不会将控制传递回 while 循环以再次检查条件。我在 Delay 活动中设置的唯一属性是:TimeoutDuration = 00:00:10(10 秒对吗?)。

有什么建议吗?

发射机

I'm quite new to Workflow and have a question.

I have a While Loop in my designer which checks a conditon.

The while loop works fine and the condtion checking works fine.

What I'm trying to do, is to set a delay so that the while loop only checks the condition every x seconds/minutes. I've tried the delay control inside the while loop, but for some reason, the delay Activity does not pass control back to the while loop to check the condition again. The only property I've set in the Delay activity is : TimeoutDuration = 00:00:10 (10 seconds right?).

Any advice?

Tx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

过潦 2024-08-27 09:15:39

如果您使用 VS 设计器(拖放),您将能够将延迟活动添加到您的工作流程中。延迟活动需要一个持续时间值,该值基本上是一个时间跨度。例如,如果您想要 5 秒的延迟,则需要为 Duation 分配以下 TimeSpan 对象:

               New TimeSpan(0, 0, 5); //0 hours, 0 minutes, 5 seconds

希望这会有所帮助!

If you use the VS designer (drag and drop), you will be able to add a Delay Activity into your workflow. The Delay Activity requires a Duration value which is basically a TimeSpan. For example, if you wanted to have a 5-sec delay you would need to assign Duation the following TimeSpan object:

               New TimeSpan(0, 0, 5); //0 hours, 0 minutes, 5 seconds

Hope this helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文