You can do this using the created WorklfowInstanceStore database. This will be a record for each running process. You can then configure the promotion of properties to retrieve values from the workflow and store them in the database. In the System.Activities.DurableInstancing.InstancePromotedProperties view, you can request values and provide you with an InstanceId instance.
See here for an example on how to get started. One good way to extract values without using user activity for this is to use a workflow tracking participant.
source
share