If you get following error in AppFabric dashboard, you will probably have no idea what the problem could be.
An error processing the current work item has caused the workflow to abort. See the inner exception for details. InnerException Message: The execution of the InstancePersistenceCommand named {urn:schemas-microsoft-com:System.Activities.Persistence/command}SaveWorkflow was interrupted by an error.
The problem with this exception is that you miss a real error description which is not tracked in the dashboard. Unfortunately when one exception is tracked in the AppFabric dashboard it is unlikely that you will find any other error in event log.
This problem is caused by using of custom tracking participant while property promoting. In this case there is probably some peace of code (class) which has to be persisted, but it is not serializable by DataContractSerializer. To find this out catch the exception by overwriting of Activity.Abort method. The value in context.Reason will contain fabulous InnerException (see error text above) with full description.
In my specific case, I used the class which implements IReceiveMessageCallback:
public class ReceiveInstanceCallback : IReceiveMessageCallback
This interface is used when you need to get access to WCF’s butty of Service Model within you workflow. It might be surprising, but the solution is to add data contract attribute to the class:
[DataContract(Namespace=WfSchedulerPromoterParticipant.PromotedPropertyXNamespace)]
public class ReceiveInstanceCallback : IReceiveMessageCallback
Posted
Aug 27 2010, 12:17 AM
by
Damir Dobric