I have a standard WCF service workflow with several Persist actions (all created via UI drag and drop). Most of the persist actions succeed, but one fails.
Wrapping the failing Persist action in a Try/Catch block does not help - it just steps over the catch and terminates the workflow.
How do I find the specific reason why the persist failed? Is any exception logged anywhere?
I'm developing on Windows XP.
I log the exception in a file adding a listener to the System.Activities.DurableInstancing namespace, you will be able to see the exception there:
<system.diagnostics>
<sources>
<source name="System.Activities.DurableInstancing" switchValue="Verbose">
<listeners>
<add name="textListener" />
<remove name="Default" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="textListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\Log\persistenceproblem.txt" traceOutputOptions="ProcessId, DateTime" />
</sharedListeners>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="textListener" />
</listeners>
</trace>
</system.diagnostics>
Here it is explained in my blog http://pablocastilla.wordpress.com/2012/05/18/how-to-analyze-a-workflow-foundation-4-0-persistence-problem/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With