Windows工作流持久性数据(VS 2010 RC / .NET 4.0)
我最近开始使用 Windows 工作流(VS2010 RC / .NET 4.0 版本),并且正在努力掌握 SQL 持久性功能。
我已成功通过 SqlWorkflowInstanceStoreBehavior 对象将持久性附加到我的 WorkflowServiceHost,并且在我的数据库中,[System.Activities.DurableInstancing].[InstancesTable] 表中出现了一些行。
但是,我不知道如何理解这些数据(似乎有很多列都是二进制格式)。如何在此存储有关我的工作流程的自定义数据?如何从 MI 风格报告的表中检索此信息?
我似乎在网上找不到任何有关存储自定义数据(然后再次检索)的信息 - 请帮助:)
提前非常感谢!
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.Activities.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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你看到的数据都是工作流持久化系统使用的,并不真正适合你自己的消费。如果您想查询自己的数据,则需要使用一种称为属性提升的机制,该机制使用 InstancePromotedProperties 表以可查询的格式存储数据。基本上,您需要实现 PersistenceParticipant 并覆盖 CollectValues() 函数以将值添加到集合之一。
有关详细信息,请参阅此处。
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.