Friday, January 24, 2014

Error "failed to start" when start workflow programmatically

When trying to start list workflow instance from a site workflow, I got an error "failed to start".

It doesn't happen all the time. For some list item, the list workflow instance was started successfully, but in 90% of cases, it just "failed to start".

However, if I cancel the workflow instance and then start it manually, it works well.

If I trigger the workflow through list item data change, it works well.

Quite annoying.

ULS doesn't help much. There are some unexpected error messages as below. But, why the workflow works well if not triggered by site workflow?

In the end, the problem disappeared after rebooting the SharePoint servers......



RunWorkflow: Microsoft.SharePoint.SPException:     at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(SPWorkflowAssociation association, SPWeb web)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.LoadDeclarativeAssembly(SPWorkflowAssociation association, Boolean fallback)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.CreateInstance(SPWorkflow workflow)     at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, C... 9c581dc6-197c-45ec-8777-2672890c0827
...ollection`1 events, SPWorkflowRunOptionsInternal runOptions) 9c581dc6-197c-45ec-8777-2672890c0827
Microsoft.SharePoint.SPException:     at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(SPWorkflowAssociation association, SPWeb web)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.LoadDeclarativeAssembly(SPWorkflowAssociation association, Boolean fallback)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.CreateInstance(SPWorkflow workflow)     at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 e... 9c581dc6-197c-45ec-8777-2672890c0827
...vents, SPWorkflowRunOptionsInternal runOptions) 9c581dc6-197c-45ec-8777-2672890c0827

RunWorkflow: Microsoft.SharePoint.SPException:     at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssem... 0add4c43-ff4e-440e-a01e-6bf3c5559cf9
...bly(SPWorkflowAssociation association, SPWeb web)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.LoadDeclarativeAssembly(SPWorkflowAssociation association, Boolean fallback)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.CreateInstance(SPWorkflow workflow)     at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 events, SPWorkflowRunOptionsInternal runOptions) 0add4c43-ff4e-440e-a01e-6bf3c5559cf9
Microsoft.SharePoint.SPException:     at Microsoft.SharePoint.Workflow.SPNoCodeXomlCompiler.LoadXomlAssembly(SPWorkflo... 0add4c43-ff4e-440e-a01e-6bf3c5559cf9
...wAssociation association, SPWeb web)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.LoadDeclarativeAssembly(SPWorkflowAssociation association, Boolean fallback)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.CreateInstance(SPWorkflow workflow)     at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow workflow, Collection`1 events, SPWorkflowRunOptionsInternal runOptions) 0add4c43-ff4e-440e-a01e-6bf3c5559cf9

No comments:

Post a Comment