使用 WF4 的电子邮件工作流程

发布于 2024-12-08 07:02:42 字数 471 浏览 0 评论 0原文

首先,我是新 WF (v4),但我可以看到好处,只是学习曲线目前阻碍了我,所以我需要你的帮助。

以我的场景为例,我有一个业务要求以不同的时间间隔发送一系列电子邮件。因此,我在工作流服务中创建了一个顺序工作流,并在每次邮件发送之间设置了适当的延迟。工作流程由 Recieve 调用启动。这部分似乎工作得很好。

不过,我希望进行第二次接收呼叫,以有效停止工作流程,以便不再发送电子邮件。

为了尝试实现这一目标,我配置了一个具有 2 个分支的 Pick 控件。分支 1 有一个 Receive with StartEmails,它会启动我的延迟电子邮件序列,如前所述。分支 2 包含第二个接收“StopEmails”,但是我的断点从未在“StopEmails 接收”上命中。我相信我已经设置了正确的关联,并且 CanCreatedInstance 设置为 false。

当第一个分支处于延迟(等待)状态时,我是否无法进行第二次调用?

任何指示将不胜感激。

Firstly I am new WF (v4), but I can see the benefits, it's just the learning curve that is holding me back at the moment so I need your help.

Take my scenario, I have a business requirement to send a series of emails at various intervals. So I have created a sequential workflow in a workflow service with the appropriate delays between each mail send. The workflow is started by a Recieve call. This part seems to work fine.

However I want a have a second Receive call that effectively stops workflow so no more emails sent.

To try and achieve this I configured a Pick control with 2 branches. Branch 1 has a Receive with StartEmails which starts my delayed sequence of emails as describe before. Branch 2 contains a second Receive 'StopEmails, however my breakpoint never gets hit on the StopEmails Receive. I beleieve I have setup the correct correlation and CanCreatedInstance is set to false.

Is it that I can't make a second call while the first branch is in a delay (waiting) state?

Any pointers would be appreciated.

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

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

发布评论

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

评论(1

中二柚 2024-12-15 07:02:42

经过更多的挖掘之后,我相信我找到了答案。请参阅这篇文章Workflow Foundation 4.0 消息关联和错误报告

我的想法是正确的,正是我的第一个分支的延迟阻止了我的第二个接收请求的执行。用并行容器替换我的 Pick 解决了这个问题。仔细想想就很有道理!

并行容器来救援!

After a little more digging on SO, I believe I found my answer. see this post Workflow foundation 4.0 message correlation and error reporting

I was correct in my thinking that it was the delay in my first branch was what was blocking my second Receive request from being executed. Replacing my Pick with a Parallel container solved the problem. Makes sense when you think about it!

Parallel container to the rescue!

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