工作流基础4.0消息关联和错误报告

发布于 2024-08-28 03:58:40 字数 400 浏览 4 评论 0原文

我有一个工作流服务,它运行并执行许多不同的操作(例如 Web 服务调用)。

如果这些操作之一失败,我会调用错误报告 Web 服务来通知单独的系统我的工作流程操作之一已失败。由于错误可能是 Web 服务关闭之类的错误,因此我循环并重试此操作,直到它正常工作。

但有时我传递给此 Web 服务的数据可能有错误并且需要更改。因此,我需要能够连接到这个正在运行(但延迟)的工作流程并更改本地工作流程变量,然后重新运行该操作。

我查看了工作流 4.0 中的消息关联来实现此目的,但由于延迟活动在我正在运行的工作流实例中处于活动状态,因此任何第二个服务调用都不会执行任何操作(就像延迟活动正在阻止任何其他请求一样)。

我尝试将“CanCreateInstance”设置为 true 和 false,但没有帮助。

谢谢!

I have a workflow service that runs and performs a number of different operations (such as web service calls).

If one of these operations fails I call an error reporting web service to notify a seperate system that one of my workflow operations has failed. As the error could be something like the web service being down, I loop and retry this operation until it works.

There can be times though when the data I'm passing to this web service is faulty and it needs changing. So I need to be able to hook into this running (but delayed) workflow and change local workflow variables and then re-run the operation.

I've looked at message correlation in workflow 4.0 to achieve this but because the delay activity is active in my running workflow instance, any second service call doesn't do anything (it's like the delay activity is blocking any other requests).

I've tried setting 'CanCreateInstance' to both true and false but it doesn't help.

Thanks!

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

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

发布评论

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

评论(2

音盲 2024-09-04 03:58:40

您需要将 Delay 活动放入并行容器中,并且其中还有接收任务。这意味着它将在等待循环处理时监听请求。

有关消息关联如何工作的示例,我发现 Tailspin Travel 示例非常有帮助。检查“等待确认”框中的“接收批准”任务,了解如何将请求绑定在一起。

You need to put the Delay activity inside a Parallel container, and also in that have the receive task. This means that it will be listening for requests while waiting for the loop to process.

For an example of how message correlation works I found the Tailspin Travel example very helpful. Check the "Receive Approval" task within the "Wait Confirmation" box to see how to tie the requests together.

水中月 2024-09-04 03:58:40

不确定这是否是您问题的答案,但可能就是这样。如果您使用工作流实例存储和属性升级,则可以选择在下次加载工作流时更改实例存储中的属性。

Not sure if this is the answer to you problems but it may just be. If you are using a workflow instance store and property promotion you have the option to change the properties in the instance store for next time the workflow is loaded.

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