FaultHandlerActivity and workflow persistence

I was just working on an issue reported against the SQL Server Compact Workflow Persistence Service I released some time ago. It turns  that if you are using workflow persistence your workflow will actually be persisted to the store when an exception is caught. Now in itself not a big problem as your whole workflow needs to be serializable anyway. Except this time where is an additional exception object and when the exception itself cannot be serialized this brings the whole workflow down. In fact it brings more that just the workflow as the whole workflow runtime crashes, not good [:(]

The culprit in this case was a SqlCeException which is not serializable! Don’t worry about the more common SqlException because that is perfectly ok.

Still something to double check as these exceptions are, by their very nature, the exceptional case and therefor less likely to be tested.



Leave a Reply

Your email address will not be published. Required fields are marked *