“Persist activities cannot be contained within no persistence blocks” error

て烟熏妆下的殇ゞ 提交于 2019-12-11 20:07:31

问题


I would like the rule for which "Persist activities cannot be contained within no persistence blocks" error happens in WF4. I see that you can not persist between the first receive-send, but I do not understand the general idea.

Any comment?

Thanks


回答1:


The goal of a no persist zone it to indicate that you are doing something that can't be resumed from the middle of it. For example a Receive and SendReply action, if you persist in the middle you can also resume from there if the workflow aborts at some later point. If you resume before the SendReply the first step after resuming is to send the reply but as there is no request there is no place to send the reply to. The same is try for a TransactionScope, you can't restart in the middle of the transaction.

So basically whenever you drop a persist activity on the workflow think of is as being able to resume the workflow from that point after reloading it from disk.



来源:https://stackoverflow.com/questions/3475416/persist-activities-cannot-be-contained-within-no-persistence-blocks-error

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