문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top