How to Create One Instance per Bookmark?

328 views Asked by At

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?

1

There are 1 answers

1
Maurice On

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.