WF4、升级属性和集合
当需要查询 WF4 实例存储以获取数据集合时,有什么建议?
例如,我的工作流程有一个 Step 对象的集合,这些对象将用于向最终用户显示他们在整个工作流程中的位置。
我应该如何公开这些数据?我认为房产促销不适合收藏。我应该将这些数据存储在我自己的表中还是有更好的方法?
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 display 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你说得对,房产促销更注重简单的价值观。有可能以序列化形式存储更复杂的数据,但这会使查询变得非常困难,这通常不是很有帮助。最好的选择是将数据存储在您自己的表中。如果要确保数据始终与工作流状态存储一致,可以使用 PersistenceIOParticipant 并更新表作为存储工作流状态的同一事务的一部分。
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.