I have a number of activities that schedule a persist activity when they execute. This all works fine unless a user drops the activity inside a TransactionScope activity, or other activity that creates a nonPersistScope.
At execution time I get a "Persist activities cannot be contained within no persistence blocks" error, and am left with no choice but to teminate the workflow.
I'm happy for these activities to be dropped into a transaction scope, where I therefore don't need to persist.
So what I would like to do inside my Execute override is
context.ScheduleActivity(persist, OnPersistComplete, OnFaulted);
However context.CanPersist doesn't exist, and I can't seem to find an alternative.
Is there such a method or alternative?
View Complete Post