pikk
pikk

Reputation: 855

No data in InstancePromotedProperties Table

I am trying to test the Microsoft's examples on Worfklows. This example WF_WCF_Samples\WF\Basic\Persistence\PersistenceParticipants is working but the data of the persisted workflow doesnt stored in the InstancePromotedProperties Table. Can anyone explain how is working without the data being stored in this table?. Thx for your time

Upvotes: 1

Views: 158

Answers (1)

Maurice
Maurice

Reputation: 27632

The setup is somewhat tricky with different moving parts that have to match.

First of all you need to use the SqlWorkflowInstanceStore.Promote() to tell the SqlWorkflowInstanceStore to store the values in the InstancePromotedProperties table. Next you need a PersistenceParticipant where you need to override the CollectValues() and store the values you want to promote in either of the 2 collections. And finaly you have to get the data from you workflow into the previously created PersistenceParticipant. That can be done using a TrackingParticipant or a custom activity.

Whaever you do you need to make sure all XNames match up. Add one in the CollectValues() and promote another and nothing will happen, no exception either. And there is a bug with promoting boolean values. That causes no no data to be written to the InstancePromotedProperties so make sure to turn them into integers or strings before collecting them.

Upvotes: 1

Related Questions