Please consider the following environment:
Nintex
Workflow 2010 (2.2.3.0) installed
CRM 2011 installed on a different server
Workflow solution deployed to all Web Applications, IISRESET, Restart Timer Service
-------
I create a workflow associated with a list item where I have a custom column called CRM Quote ID. The workflow picks up the list item value, queries CRM using the friendly Quote ID in order to determine the GUID for the item. I then immediately call Update CRM using that GUID and just update the Name to say "Hello from Nintex Workflow @ <date time>".
That workflow runs absolutely fine.
But... if I add a Request Approval action below the Update CRM call and just have simple notifications going back to originator on rejected/approved then the workflow fails every time. The approval task is marked as incomplete, I get an email saying my approval is no longer required and another confirming the workflow errored.
What's odd is that I can add another "simple" action like Send a Notification and that happens but when it eventually hits the Request Approval (and Flexi Task too) the workflow errors.
If I remove the Update CRM call, the workflow runs OK and the Request Approval executes. So, both the Update CRM and Request Approval actions are configured properly but if the Update CRM happens before the Request Approval then the workflow errors.
Looking in the logs of one of the servers (I re-created it on 2 different servers although this log is from a slightly older build of NW2010) this is what is reported:
Unable to serialize workflow, exception: Type 'Microsoft.Crm.SdkTypeProxy.Metadata.MetadataService' in Assembly 'Microsoft.Crm.SdkTypeProxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable.
shortly followed by;
: Nintex.Workflow.NWHumanApprovalException: Failed to update workflow task. ---> System.ArgumentException: Item does not exist. It may have been deleted by another user.
System.Workflow.Runtime.Hosting.PersistenceException: Type 'Microsoft.Crm.SdkTypeProxy.Metadata.MetadataService' in Assembly 'Microsoft.Crm.SdkTypeProxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable. ---> System.Runtime.Serialization.SerializationException: Type 'Microsoft.Crm.SdkTypeProxy.Metadata.MetadataService' in Assembly 'Microsoft.Crm.SdkTypeProxy, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable.
Has anyone experienced this and is there a fix?