开发者

Windows Workflow Persistence data (VS 2010 RC / .NET 4.0)

开发者 https://www.devze.com 2022-12-20 00:30 出处:网络
I have started working with Windows Workflow recently (the VS2010 RC / .NET 4.0 version) and am stuggling to get to grips with the SQL persistence functionality.

I have started working with Windows Workflow recently (the VS2010 RC / .NET 4.0 version) and am stuggling to get to grips with the SQL persistence functionality.

I have managed to attach persistence to my WorkflowServiceHost via an SqlWorkflowInstanceStoreBehavior object and in my database there are rows appearing in the [System.Ac开发者_Go百科tivities.DurableInstancing].[InstancesTable] table.

However, I don't know how to make sense of any of this data (it seems as though quite a few columns are in binary format). How can I store custom data regarding my workflow in this? How do I retreive this from the table for MI style reporting?

I can't seem to find any info on the web regarding storing custom data (and then retrieving it again) - please help :)

Many thanks in advance!


The data you see is all use by the workflow persistence system and not really suitable for your own consumption. If you want to query on your own data you need to use a mechanism called property promotion that stores the data in a queryable format using the InstancePromotedProperties table. Basically you need to implement a PersistenceParticipant and overwrite the CollectValues() function to add the values to one of the collections.

See here for more details.

0

精彩评论

暂无评论...
验证码 换一张
取 消