如何在 Workflow 4.0 中设置 WorkflowApplication 实例的 Id
在工作流程 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 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?