Wednesday, May 13, 2015

Nintex Workflow Task Form giving error Failed to retrieve form from workflow. Error: Value cannot be null.

Issue: A strange error started coming on one of the SharePoint 2010 environment when a Nintex 2010 workflow task form is opened by the assigne, it breaks and does not open the task form. The reason is unknown but the issue is grave because none of the assigned task form works.

Detailed error stack trace is like

Area     : SharePoint FoundationCategory : GeneralEventID  : 8ncaMessage  : Application error when access /XXXX/Lists/Workflow Tasks/EditForm.aspx, Error=Value cannot be null.  Paramete           r name: s   at System.IO.StringReader..ctor(String s)     at Nintex.Workflow.WorkflowConfig2010.LoadWorkflow           Config(String configXml)     at Nintex.Workflow.Forms.ControlTemplates.TaskForm.GetWorkflowConfig()     at N           intex.Workflow.Forms.ControlTemplates.TaskForm.GetForm(String formKey, FormData formData)     at Nintex.Work           flow.Forms.ControlTemplates.TaskForm.ConfigureFiller()     at Nintex.Workflow.Forms.ControlTemplates.TaskFor           m.InitialiseForm()     at Nintex.Workflow.Forms.ControlTemplates.TaskForm.OnInit(EventArgs e)     at System.           Web.UI.Control.InitRecursive(Control namingContainer)     at System.Web.UI.Control.InitRecursive(Control nam           ingContainer)     at System.Web.UI.Control.AddedControl(Control control, Int32 index)     at Microsoft.Share           Point.WebPartPages.ListFormWebPart.CreateChildControls()     at System.Web.UI.Control.EnsureChildControls()               at Microsoft.SharePoint.WebPartPages.WebPart.get_WebPartMenu()     at Microsoft.SharePoint.WebPartPages.          ListFormWebPart.CreateWebPartMenu()     at System.Web.UI.Control.OnLoad(EventArgs e)     at Microsoft.ShareP           oint.WebPartPages.ListFormWebPart.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at Sy           stem.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Contro           l.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Control.LoadRecursive()               at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAft           erAsyncPoint)

Resolution: In order to resolve this issue I tried saving the task form by opening the task form in the Nintex workflow and saving it, republishing the workflow couple of times but in vain. Even the ULS logs provided only the above error with no clue as to why it was breaking. I took following steps to resolve this issue:

1. Export the existing error prone workflow as a backup copy.
2. Delete the workflow from the list in the current environment.
3. Export the same workflow from another environment i.e. production.
4. Imported the exported workflow to the problematic environment and publish it.

After publishing the workflow the task forms started opening correctly and the error was gone. There was no change in list permission level, site user groups, list definition or task form. However, it might save someones time in getting around such issue.

Happy Workflow-ing :)

No comments: