WF4, Promoted Properties, and Collections
What's the recommendation when needing to query an WF4 instance store for a collection of data?
For example, my workflow has a collection of Step objects that will be used to dis开发者_Go百科play to end users where at in the overall workflow they are.
How should I expose this data? I don't think property promotion is a good fit for collections. Should I just store this data in my own tables or is there a better way?
You are right, the property promotion is more geared towards simple values. There is a possibility to store more complex data in a serialized form in there but as that would make it very hard to query that is usually not very helpful. Your best bet would be to store the data in your own tables. If you want to ensure your data is always consistent with the workflow state stores you can use an PersistenceIOParticipant and update your tables as part of the same transaction that stores the workflow state.
精彩评论