Nintex workflow task not updating

  • 15 September 2017
  • 2 replies
  • 51 views

I am trying to use Nintex DLL in my project for some approval task in my project, in a similar manner the Out of the box nintex approval might be using. In Out of the box nintex approval page it updates the Nintex Workflow task list with approval/reject status . I tried this approach and an item in “Nintex Workflow Task” list is getting updated but with “Pending” as status every time I update the list instead of approval. Can someone answer why the changes are not committed after calling the clientContext.ExecuteQuery() method. Please find below the code snippet ::

ListItem item = lists.GetItemById(userTask.SharePointTaskId);
item["ContentTypeId"] = "0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
item.FieldValues["ID"] = 574;
item.FieldValues["Title"] = "Test";
item.FieldValues["ApproverComments"] = "Test Approval";
item.FieldValues["Decision"] = 1;
item.FieldValues["ApprovalOutcome"] = 1;
item.FieldValues["Status"] = "Completed";
item.FieldValues["WorkflowOutcome"] = "Approved";
item.FieldValues["Completed"] = "True";
item.FieldValues["PercentComplete"] = 1.0f;
item.FieldValues["Comments"] = "Test Approval";
item.Update(); // ITEM GETTING UPDATED HERE
clientContext.ExecuteQuery(); // AFTER EXECUTING THIS STATEMENT THE CHANGES VANISHES, AND DO NOT PERSIST


2 replies

Userlevel 6
Badge +16

I suggest you to set your task response with this web service method >>> ProcessTaskResponse3 

Userlevel 6
Badge +16

Hi ‌, have you solved it?

Reply