设置工作流程的特定指导 [英] Setting a specific guid for a workflow
问题描述
您好!
像以前的版本一样,在使用4.0实例化工作流时,是否无法指定特定的Guid作为工作流的身份?
/>
最好的问候,
Henrik Dahl
Hello!
Isn't it possible to specify a specific Guid to be the identity of the workflow when instantiating a workflow using 4.0 as it was with the earlier versions?
Best regards,
Henrik Dahl
推荐答案
您好,Henrik,
要充分利用工作流运行时的性能,可以将WorkflowInstance子类化.它具有创建GUID作为工作流ID的虚拟方法.但是,我不建议您这样做,因为编写您自己的自定义WorkflowInstance可能会涉及到很多事情.
您的情况是什么?我认为您可以使用字典"将身份(而不是覆盖现有身份)或工作流相关联,使用提升的属性将其与持久性存储相关联,并使用基于内容的关联将其与工作流服务相关联.
希望可以帮上忙,
,谢谢,
安德鲁
Hi Henrik,
To use the full breath of the workflow runtime, you can subclass WorkflowInstance. It has a virtual method to create a GUID as the ID of the workflow. However, I won't recommend you to do this because it might be quite involved to write your own custom WorkflowInstance.
What is your scenario? I think you can associate an identity (instead of overriding the existing identity) or a workflow by using a Dictionary, to the persistence store by using promoted properties, and to workflow services using content based correlation.
Hope that helps,
Thanks,
Andrew
这篇关于设置工作流程的特定指导的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!