Question

I have a WF4 workflow service deployed in AppFabric. Is there any built-in way to do a generic search across all currently active workflow instances?

For example, "get me a list of all active instances that have variable x = 5"?

If someone could point me in the right direction on this it would be much appreciated.

Was it helpful?

Solution

You can do so using the WorklfowInstanceStore database that is created. This will have an entry for every workflow that is running. Next you can configure property promotion to extract values from the workflow and have them stored in the database. The System.Activities.DurableInstancing.InstancePromotedProperties view will let you query for the values and give you the workflow InstanceId.

See here for an example on how to get started. One nice way to extract values without using a custom activity to do so is using a workflow tracking participant.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top