views:

96

answers:

1

Hello,

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.

A: 

You can do so using the WorklfowInstanceStore database that is created. Thi swill 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.

Maurice
Thanks, Maurice. I'll start researching on this stuff.
racingcow