Workflow foundation deserialization from business objects

故事扮演 提交于 2019-12-11 06:55:52

问题


I'm studying Microsoft WF samples and have found that they serializing/deserializing workflows that are not finished to hold its state. I don't like it as workflow is a process and it doesn't need any additional data to continue from a different thread or code part.

Maybe I've missed something. Can you share examples of saving/loading unfinished workflows if it's possible? Maybe alternative workflow frameworks can do without serialization/deserialization. For example it could be restored from business object state.


回答1:


You're thinking far too small. There are many uses beyond what you can imagine right now. All workflow frameworks (unless they use some type of object db?) will serialize the workflow state so it can be continued at a later time. Microsoft WF, K2 BlackPerl and many others do this. K2 does it because you can have an item going through workflow v1 and then right in the middle someone will update the workflow to v2 but K2 is smart enough to know that is should continue processing that item under the v1 workflow.

Maybe i'm missing your question but it seems like you don't like that it serializes the workflow for storage.



来源:https://stackoverflow.com/questions/5092530/workflow-foundation-deserialization-from-business-objects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!