1

The SharePoint install is a SP2010 install on a 2008 R2 server. Everything is fully patched. I am running the SP Designer on the SharePoint Server directly.

I have a workflow which is intended to send an email when a new document is created in a custom list. I have deliberately kept the workflow very simple in order to illustrate this problem.

After creating this single step workflow in SP Designer, I click "Check for Errors" and SP Designer reports "The workflow contains no errors".

I then click "Publish" but the Workflow Error dialog is displayed with the message

Errors were found when compiling the workflow. The workflow files were saved but cannot be run.

Clicking the advanced button reveals more information:

Could not publish the workflow because the workflow configuration file contains errors

Any suggestions gratefully received

Logs:

02/03/2014 10:52:20.32  w3wp.exe (0x1240)   0x22E8  SharePoint Foundation   Logging Correlation Data    xmnv    Medium  Name=Request (POST:https://testsp.testdomain.com/enterprise/marketing/Content%20Management/_vti_bin/_vti_aut/author.dll)    905ac3f9-9a15-43b1-8739-67084a637c66
02/03/2014 10:52:20.32  w3wp.exe (0x1240)   0x20F0  SharePoint Foundation   General af71    Medium  HTTP Request method: POST   905ac3f9-9a15-43b1-8739-67084a637c66
02/03/2014 10:52:20.32  w3wp.exe (0x1240)   0x20F0  SharePoint Foundation   General af75    Medium  Overridden HTTP request method: POST    905ac3f9-9a15-43b1-8739-67084a637c66
02/03/2014 10:52:20.32  w3wp.exe (0x1240)   0x20F0  SharePoint Foundation   General af74    Medium  HTTP request URL: /enterprise/marketing/Content%20Management/_vti_bin/_vti_aut/author.dll   905ac3f9-9a15-43b1-8739-67084a637c66
02/03/2014 10:52:20.32  w3wp.exe (0x1240)   0x20F0  SharePoint Foundation   General 72ng    Medium  RPC method = put document   905ac3f9-9a15-43b1-8739-67084a637c66
02/03/2014 10:52:20.32  w3wp.exe (0x1240)   0x20F0  SharePoint Foundation   General 72n3    Medium  put file doc URL = Workflows/Cust - All Calendar Mover/Cust - All Calendar Mover.xoml.wfconfig.xml  905ac3f9-9a15-43b1-8739-67084a637c66
02/03/2014 10:52:20.40  w3wp.exe (0x1240)   0x1EA0  SharePoint Foundation   Monitoring  b4ly    Medium  Leaving Monitored Scope (Request (POST:https://testsp.testdomain.com/enterprise/marketing/Content%20Management/_vti_bin/_vti_aut/author.dll)). Execution Time=90.3983606855061  905ac3f9-9a15-43b1-8739-67084a637c66
02/03/2014 10:52:20.57  w3wp.exe (0x1240)   0x1EA0  SharePoint Foundation   Monitoring  nasq    Medium  Entering monitored scope (Request (POST:https://testsp.testdomain.com/enterprise/marketing/Content%20Management/_vti_bin/webpartpages.asmx))    
02/03/2014 10:52:20.57  w3wp.exe (0x1240)   0x1EA0  SharePoint Foundation   Logging Correlation Data    xmnv    Medium  Name=Request (POST:https://testsp.testdomain.com/enterprise/marketing/Content%20Management/_vti_bin/webpartpages.asmx)  2b5d2e57-744f-4594-84d2-b6a055922269
02/03/2014 10:52:20.57  w3wp.exe (0x1240)   0x1EA0  SharePoint Foundation   Monitoring  b4ly    Medium  Leaving Monitored Scope (Request (POST:https://testsp.testdomain.com/enterprise/marketing/Content%20Management/_vti_bin/webpartpages.asmx)). Execution Time=3.74153698305232    2b5d2e57-744f-4594-84d2-b6a055922269
02/03/2014 10:52:20.60  w3wp.exe (0x1240)   0x22E8  SharePoint Foundation   Monitoring  nasq    Medium  Entering monitored scope (Request (POST:https://testsp.testdomain.com/enterprise/marketing/Content%20Management/_vti_bin/webpartpages.asmx))    
02/03/2014 10:52:20.60  w3wp.exe (0x1240)   0x22E8  SharePoint Foundation   Logging Correlation Data    xmnv    Medium  Name=Request (POST:https://testsp.testdomain.com/enterprise/marketing/Content%20Management/_vti_bin/webpartpages.asmx)  52480d4a-d374-444e-a422-6bf4d005abd0
02/03/2014 10:52:20.62  w3wp.exe (0x1240)   0x22E8  SharePoint Foundation   Logging Correlation Data    xmnv    Medium  Site=/  52480d4a-d374-444e-a422-6bf4d005abd0
02/03/2014 10:52:20.62  w3wp.exe (0x1240)   0x0CD0  SharePoint Foundation   Topology    e5mc    Medium  WcfSendRequest: RemoteAddress: 'http://spwebserver:32843/90c44574668945e4ad89bec840140dc7/MetadataWebService.svc' Channel: 'Microsoft.SharePoint.Taxonomy.IMetadataWebServiceApplication' Action: 'http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/GetChanges' MessageId: 'urn:uuid:ea4a4503-74d8-49e7-954e-ac6fde43110f' 
02/03/2014 10:52:20.63  w3wp.exe (0x109C)   0x1844  SharePoint Foundation   Topology    e5mb    Medium  WcfReceiveRequest: LocalAddress: 'http://spwebserver.local:32843/90c44574668945e4ad89bec840140dc7/MetadataWebService.svc' Channel: 'System.ServiceModel.Channels.ServiceChannel' Action: 'http://schemas.microsoft.com/sharepoint/taxonomy/soap/IDataAccessReadOnly/GetChanges' MessageId: 'urn:uuid:ea4a4503-74d8-49e7-954e-ac6fde43110f'  22e6930c-d5ff-468d-8121-88d62f038018
02/03/2014 10:52:20.63  w3wp.exe (0x109C)   0x1844  SharePoint Foundation   Monitoring  nasq    Medium  Entering monitored scope (ExecuteWcfServerOperation)    22e6930c-d5ff-468d-8121-88d62f038018
02/03/2014 10:52:20.63  w3wp.exe (0x109C)   0x1844  SharePoint Server   Taxonomy    fuc5    Medium  MetadataWebServiceApplication.GetChanges called on 'Hosting Farm Tenant Managed Metadata Service' starting. 22e6930c-d5ff-468d-8121-88d62f038018
02/03/2014 10:52:20.63  w3wp.exe (0x109C)   0x1844  SharePoint Server   Taxonomy    fuc6    Medium  MetadataWebServiceApplication.GetChanges called on 'Hosting Farm Tenant Managed Metadata Service' completed.    22e6930c-d5ff-468d-8121-88d62f038018
02/03/2014 10:52:20.63  w3wp.exe (0x109C)   0x1844  SharePoint Foundation   Monitoring  b4ly    Medium  Leaving Monitored Scope (ExecuteWcfServerOperation). Execution Time=1.85945420437514    22e6930c-d5ff-468d-8121-88d62f038018
02/03/2014 10:52:20.65  w3wp.exe (0x1240)   0x22E8  SharePoint Foundation   Monitoring  b4ly    High    Leaving Monitored Scope (EnsureListItemsData). Execution Time=11.9576650104971  52480d4a-d374-444e-a422-6bf4d005abd0
02/03/2014 10:52:20.71  w3wp.exe (0x1240)   0x22E8  SharePoint Foundation   Monitoring  b4ly    High    Leaving Monitored Scope (EnsureListItemsData#3). Execution Time=10.468369583285 52480d4a-d374-444e-a422-6bf4d005abd0
02/03/2014 10:52:20.73  w3wp.exe (0x1240)   0x22E8  SharePoint Foundation   General avfy    High    SOAP exception: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Workflow.SPWorkflowAssociation.set_AutoStartCreate(Boolean value)     at Microsoft.SharePoint.Workflow.SPWorkflowNoCodeSupport.AssociateDeclarativeWorkflow(SPWeb web, SPWorkflowTemplate template, XmlDocument configInfo, SPWorkflowAssociation& newAssociation)     at Microsoft.SharePoint.SoapServer.WebPartPagesWebService.AssociateWorkflowMarkup(String configUrl, String configVersion)   52480d4a-d374-444e-a422-6bf4d005abd0
02/03/2014 10:52:20.73  w3wp.exe (0x1240)   0x22E8  SharePoint Foundation   Monitoring  b4ly    Medium  Leaving Monitored Scope (Request (POST:https://testsp.testdomain.com/enterprise/marketing/Content%20Management/_vti_bin/webpartpages.asmx)). Execution Time=129.046848132933    52480d4a-d374-444e-a422-6bf4d005abd0
02/03/2014 10:52:20.80  w3wp.exe (0x161C)   0x0EFC  Excel Services Application  Excel Calculation Services  8jg2    Medium  ResourceManager.PerformCleanup: Memory Manager: CurrentSize=467992576.  53fed7f1-cd9a-7517-0000-000050f7b00c

The same workflow works fine in Dev but not in Production...!

  • I cannot see the relevant error in the logs you pasted here – MdMazzotti Feb 3 '14 at 17:05
  • @MdMazzotti, there is a null pointer in a workflow related class in there – Robert Lindgren Feb 3 '14 at 17:23
  • @RobertLindgren, is there a way to fix this? it is a hidden list..does this cause the issue? – Karthikeyan Feb 3 '14 at 17:31
  • 1
    it shouldnt, i have workflows running on hidden lists – Eric Alexander Feb 3 '14 at 17:41
  • Try having the only step in the workflow being a simple log statement and see if that has the same issues. – tyshock Feb 3 '14 at 21:28
8
+25

I've bumped into this a couple of times, both times it was caused by copy and pasting actions between workflows. It appears if you copy and paste a line such as:

Set WorkflowVariable to TaskProcessVariable

into a workflow the reference to the task process variable confuses SPD and is replaced by some giberish. If you simply re-assign the task process variable to the new one in your workflow it will look happy within SPD, but leave references to the old variable in the xoml file. These references produce an out of scope error and cause the workflow to fail to compile.

The solution if to delete these lines and rewrite them :(, which realy sucks if you have alot of them, but is often faster than re-writing the workflow from scratch without copy/pasting any code.

Note: I've only encountered this issue when copying varriables specific to the current task or task process, workflow varriables can be copied if they are declared in your workflow beforehand.

Note Note: Make sure you check your if statments and email contents for these variables if you copied any of them.

Note Note Note: Speaking of emails, never copy and paste them if they contain lookups, SPD deals with this horribly.

Good Luck!

  • I was thinking the same thing: that it must be coming from copying and pasting an action. Unfortunately, after fixing the workflow, you often need to restart IIS as well. – TigerBear Oct 7 '16 at 7:53
2

well your error say all!

02/03/2014 10:52:20.73 w3wp.exe (0x1240) 0x22E8 SharePoint Foundation General avfy High SOAP exception: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.Workflow.SPWorkflowAssociation.set_AutoStartCreate(Boolean value) at Microsoft.SharePoint.Workflow.SPWorkflowNoCodeSupport.AssociateDeclarativeWorkflow(SPWeb web, SPWorkflowTemplate template, XmlDocument configInfo, SPWorkflowAssociation& newAssociation) at Microsoft.SharePoint.SoapServer.WebPartPagesWebService.AssociateWorkflowMarkup(String configUrl, String configVersion)
52480d4a-d374-444e-a422-6bf4d005abd0

could be a few things! but looks like its trying to access an object that is returning null or before its instansiated. what fields from the list are you using for the email? are you using assignedto? as that needs to be not hidden to be used!

also check this out:

http://social.technet.microsoft.com/Forums/sharepoint/en-US/fc5a3f97-6eb8-4d77-b241-a77abca187af/failed-to-start-sharepoint-designer-workflow?forum=sharepointcustomizationprevious

1

Not that it is a real answer, but it might help you to find the cause of the problem.

Deactivate the bottom half of your workflow. Save and publish it. Does it still give an error? If not, activate half of the content of the workflow that you have just deactivated. Save and publish again. No error? Then activate half of what you have left that is deactivated, save and publish again, and so on and so on.

The point of this is that you can find out what part of your workflow gives the error. I personally had a similar problem with sending an e-mail through a workflow. I used a Nintex workflow with a trim function to remove spaces, and that trim function caused the error (even though I checked for errors prior to publishing, but as soon as I wanted to publish it I got an error).

I genuinely hope you will find the cause of this.

0

Not sure how it happened but SharePoint added about 10 variables to my WF that were completed unintended. When I removed these variables the error went away.

-1

First do quick test - try deactivating and re-activating the site workflow features, check if issue is resolved.

I believe there is a limit on creating number of variables, IF loops/conditions used etc. in a workflow.

Are you using many types - for e.g four approval, 2 feedback processes etc. Because such types bring a lot of variables with them. See if you can simplify and optimise your logic, may be you have to split it into two or more workflows to get your job done.

I see that you mentioned simple log workflow works. I guess, it is not a server side any config issue. Try removing the parts of the code and test if workflow is published for every scenario. Just a trial and error method to see at what point / code modification publishing the workflow breaks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.