AnsweredAssumed Answered

Error: Error in Request Approval Action: parameter name:String

Question asked by on Oct 19, 2016

While approving/rejecting the Nintex workflow through custom code in production it is giving error 'Error in request approval action. value cannot be null. Parameter Name: String.', but we are not giving any parameter name like String in nintex workflow.    

Doing same action through Nintex workflow OOB, approve/Reject page is working.       

Doing the same action in Development server it is not giving any error with custom code and it is working perfectly with custom code. Nintex workflow versions:in development Server : Nintex workflow 2013( 

In production Server: Nintex workflow 2013( Also attaching custom code for approve/rejection of nintex workflow for reference.

Decision values: Approve:0 Reject:1

My Custom code is: 

 private string ApproveRejectNintexTask(SPWeb web, SPList taskList, int itemID, int decision, string comments) {       try { SPListItem spTask = taskList.GetItemById(itemID); Guid commentsFieldId = Nintex.Workflow.Common.NWSharePointObjects.FieldComments; Guid decisionFieldId = Nintex.Workflow.Common.NWSharePointObjects.FieldDecision; Guid outcome = Nintex.Workflow.Common.NWSharePointObjects.FieldApprovalOutcome; spTask[decisionFieldId] = decision; spTask[commentsFieldId] = comments; spTask[outcome] = 2; spTask.Update();  return comments; } catch (Exception ex) { HandleException(ex.StackTrace, "Error occured on ApproveRejectNintexTask Method " + ex.Message); } return comments; }

For Reference i'm adding images also.
Please help me to resolve this flow structureError