“持久活动不能包含在没有持久性块中"错误 [英] "Persist activities cannot be contained within no persistence blocks" error

查看:30
本文介绍了“持久活动不能包含在没有持久性块中"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在 WF4 中发生持久性活动不能包含在无持久性块中"错误的规则.我看到你不能坚持第一次接收-发送之间,但我不明白大体的想法.

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.

有什么意见吗?

谢谢

推荐答案

无持久区的目标是表明你正在做一些不能从中间恢复的事情.例如,Receive 和 SendReply 操作,如果您坚持在中间,如果工作流在稍后的某个时间中止,您也可以从那里恢复.如果您在 SendReply 之前恢复,则恢复后的第一步是发送回复,但由于没有请求,因此无法将回复发送到.同样是try一个TransactionScope,不能在事务中途重启.

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.

这篇关于“持久活动不能包含在没有持久性块中"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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