Skip to main content

Hi,

Using Nintex workflows I have created a workflow and attached it to a content type and tested that it runs manually ok.  I want it to run according to a retention policy, and so I created a policy based on one of the content type's date fields to start my workflow automatically.  When I manually run the timer jobs I see the following error in ULS logs and the workflow does not start.  Interestingly if I amend the policy to do something simple like move the item to the recycle bin, that works fine.

 

Can anyone suggest what is wrong and where I can go from here to find the issue?

Thanks

 

Error running the expiration action on item <document url> .  Error:  System.InvalidOperationException: The workflow with id=<workflow id > is no longer available.   

at Microsoft.Office.RecordsManagement.PolicyFeatures.WorkflowExpirationAction.RunExpirationWithPostActions(SPListItem item, XmlNode parametersData, DateTime expireDate)   

at Microsoft.Office.RecordsManagement.PolicyFeatures.BaseExpirationAction.Microsoft.Office.RecordsManagement.PolicyFeatures.IExpirationActionWithPostActions.OnExpirationWithPostActions(SPListItem item, XmlNode parametersData, DateTime expireDate)   

at Microsoft.Office.RecordsManagement.PolicyFeatures.ExpirationTask.ExpirationActionData.RunExpirationAction(SPListItem item, DateTime expireDate)   

at Microsoft.Office.RecordsManagement.PolicyFeatures.ExpirationTask.<>c__DisplayClass19.<ProcessExpiredItems>b__17(SPListItem item)   

at Microsoft.Office.Server.Utilities.MonitoredScopeWrapper.RunWithMonitoredScope(Action code)   

at Microsoft.Office.Server.Utilities.ContentIterator.ProcessItem(SPListItem item, Boolean fIncludeFolderItems, MonitoredScopeWrapper monitoredScopeWrapper, ItemProcessor itemProcessor, ItemProcessorErrorCallout errorCallout)

Matthew,

You don't mention these details, so I'm going to conclude that the following is true:

  • The policy is applied at either the site collection content type or at a list/library level.
    • If at the site collection, Nintex workflow needs to be a Site Collection Reusable or Site Workflow (I forget which) and has to exist before the policy is created.
    • If policies are applied at the library level, then the workflow is associated at this level also.
  • The items you're wanting to run policy on are somewhere in this site collection. Published content types (to other site collections) require more work to get associated workflows to run on them.

Another thing to note is that the workflows for policies are referenced by ID, so if you republish a workflow, the policy will still point back to the previous version. You'll need to edit the policy of you want it to point to the latest version. Also, if you're not saving workflow versions and you republish - this may cause an error - since the previous workflow version won't exist.

Hope this helps.


Reply