developers.de
daenet's .NET Community

InstancePersistenceCommand error in AppFabric

Damir Dobric Posts

 

Damir@Phone    



My upcoming sessions:

AppFabric Applications at
NRW Conf 2011
09.Sept.2011 Wuppertal

HTML5 widgets in WP7+
Monodroid
Mobility Day
21.Sept.2011 - Zagreb

AppFabric and WCF sessions at
Advanced Developer Conference
26.-27. Oktober 2011 in Frankenthal

AppFabric Applications, queues, topics and more at
Prio Conference
02. - 03. November 2011 in Meistersingerhalle Nürnberg

AppFabric Applications deep dive hosted by
.NET User Group Frankfurt
17.Nov.2011 18.30-22.30 Microsoft - Bad Homburg 

 

 

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
Filed under: , ,

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
daenet GmbH