I have created simple approval workflow. When user add data to custom list through HTML / jQuery / SharePoint REST API workflow will start and create workflow task.
I created another custom form where I am completing task by JSOM and I can see that task is completed but still it shows nintex workflow stuck on approval task.
I like to know is there any way that we can complete task from javascript or any web service trigger from C#. Kindly guide me for the same.
Solved! Go to Solution.
Kind request for the help
have a look on workflow SDK - https://help.nintex.com/en-US/sdks/sdk2013/#Reference/SDK_NW_REF_NAV.htm%3FTocPath%3DNintex%2520Soft...
Ok as per your suggestion I used web service for approval task. As below
public string ProcessTaskResponse3(string comments, string outcome, int spTaskId, string taskListName)
{
string strReturn = "";
try
{
NintexWorkflowWS WS = new NintexWorkflowWS();
WS.UseDefaultCredentials = true;
ProcessTaskResponseResult result = new ProcessTaskResponseResult();
result = WS.ProcessTaskResponse3(comments, Outcome.Approved, spTaskId, taskListName);//(Outcome)Enum.Parse(typeof(Outcome), outcome)
strReturn = result.ToString();
}
catch (Exception ex)
{
strReturn = ex.Message.ToString();
}
return strReturn;
}
But I am getting below error
Server was unable to process request. ---> Item does not exist. It may have been deleted by another user.
I checked id of the task id which is correct I am passing. Kindly let me know what can be the issue
Any help on above.
does the user account that runs the request have sufficient permissions on task list and task item itself?
what's the action that created the task?
have you noticed there are different ProcessTaskResponse# methods for different type of tasks?
have you seen examples how to process different task types https://help.nintex.com/en-US/sdks/sdk2013/#Operational/SDK_NW_OPS_TasksProcessResp.htm%3FTocPath%3D...
does the user account that runs the request have sufficient permissions on task list and task item itself?
Yes, same user is executing task who was assigned
what's the action that created the task?
Below action created task
have you noticed there are different ProcessTaskResponse# methods for different type of tasks?
I did not understand above question.
I used all below and giving same error.
ProcessTaskResponse
ProcessTaskResponse2
ProcessTaskResponse3
Please somebody help.
ProcessTaskResponse3 is proper method for 'Request Approval' task action.
unfortunately I do not have chance to test your .net code, but could you try direct web service call from workflow?
something like this
does this work for you?
if not, and you still get an error like task item doesn't exist, could try simple Query list action to query workflow task list for a given task item by its ID?
perform both tests with task assignee user account!
task response request approval processtaskresponse3 permissions credentials call we bservice action