如何在 Workflow 4.0 中设置 WorkflowApplication 实例的 Id

发布于 2024-08-31 02:24:08 字数 212 浏览 3 评论 0原文

在工作流程 3.0-3.5 中,您可以显式设置您启动的工作流程的 ID。这个功能特别有用。我看不到在 Workflow 4.0 中执行此操作的方法。有谁知道这是否可能?由于 Id 属性是只读的,并且没有接受 Id 的重载构造函数,因此我看到的唯一可能的机制是,在将 IDictionary 对象传递到 WorkflowApplication 构造函数时是否可以使用魔术键。

干杯,
罗兰

In workflow 3.0-3.5 you could explicitly set the Id of a workflow you start. This feature was particularly useful. I cannot see a way to do this in Workflow 4.0. Does anyone know if this is possible? Since the Id property is read-only and there is no overloaded constructor accepting an Id, the only possible mechanism I see is if there is a magic key that could be used when passing the IDictionary object into the WorkflowApplication constructor.

Cheers,
Rohland

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

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

发布评论

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

评论(1

没企图 2024-09-07 02:24:08

在 WF4 中,无法执行此操作,ID 始终由 WorkflowApplication 生成。参数字典也不会帮助你。

为什么要为工作流指定 Guid,而不是 WorkflowApplication 为您提供 Guid?

In WF4 there is no way to do this and the ID is always generated by the WorkflowApplication. The arguments dictionary isn't going to help you there either.

Why do you want to specify a Guid for a workflow instead of the WorkflowApplication providing one for you?

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