Windows 工作流持久性数据 (VS 2010 RC/.NET 4.0) [英] Windows Workflow Persistence data (VS 2010 RC / .NET 4.0)

查看:50
本文介绍了Windows 工作流持久性数据 (VS 2010 RC/.NET 4.0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用 Windows Workflow(VS2010 RC/.NET 4.0 版本),并且正在努力掌握 SQL 持久性功能.

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.

我已设法通过 SqlWorkflowInstanceStoreBehavior 对象将持久性附加到我的 WorkflowServiceHost,并且在我的数据库中,[System.Activities.DurableInstancing].[InstancesTable] 表中出现了一些行.

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.

但是,我不知道如何理解这些数据中的任何一个(似乎很多列都是二进制格式).如何在此存储有关我的工作流程的自定义数据?我如何从 MI 样式报告的表格中检索它?

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 :)

非常感谢!

推荐答案

你看到的数据都是工作流持久化系统使用的,并不适合你自己消费.如果您想查询自己的数据,您需要使用一种称为属性提升的机制,该机制使用 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.

这篇关于Windows 工作流持久性数据 (VS 2010 RC/.NET 4.0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆