如何为每个书签创建一个实例?
背景:
我们当前使用 WF 4 和 SQL 工作流实例存储将我们的工作流保存在每个书签上。第一次保留工作流时,会在表“System.Activities.DurableInstancing.InstancesTable”中创建一条新记录。在每个后续持久化过程中,现有记录将被删除并插入新记录。
问题:
如何修改此行为,以便在每次后续持久保存时,都会在实例表中创建一个新记录?
注意:
您可以创建自定义实例存储,但这样做并不简单。有没有办法可以使用 System.Activities.DurableInstancing.SqlWorkflowInstanceStore 类,但自定义此行为?
Background:
We currently use WF 4 and the SQL Workflow Instance Store to persist our workflows at each bookmark. The first time a workflow is persisted, a new record is created in the table "System.Activities.DurableInstancing.InstancesTable". On each subsequent persist, existing records are deleted and a new record inserted.
Question:
How could you modify this behavior so that on each subsequent persist, a new record would be created in the instances table?
Notes:
You can create a custom instance store, but it is "non-trivial" to do so. Is there a way you could use the System.Activities.DurableInstancing.SqlWorkflowInstanceStore class, but customize this behavior?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
InstancesTable 包含每个工作流实例的一条记录,因此同一工作流实例有多个记录至少会非常混乱。
听起来您好像正在尝试使用 InstancesTable 进行跟踪。如果是这种情况,您应该考虑创建一个 改为 TrackingParticipant。
The InstancesTable contains a record per workflow instance so having multiple records there for the same workflow instance would be very confusing at the very least.
It kind of sounds like you are trying to use the InstancesTable for tracking. If that is the case you should take a look at creating a TrackingParticipant instead.