cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

Nintex approval workflow task complete from custom form

Jump to solution

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.

Labels: (1)
0 Kudos
Reply
12 Replies
Workflow Hero

Re: Nintex approval workflow task complete from custom form

Jump to solution

Kind request for the help

0 Kudos
Reply
Workflow Hero

Re: Nintex approval workflow task complete from custom form

Jump to solution
0 Kudos
Reply
Workflow Hero

Re: Nintex approval workflow task complete from custom form

Jump to solution

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

0 Kudos
Reply
Workflow Hero

Re: Nintex approval workflow task complete from custom form

Jump to solution

Any help on above. 

0 Kudos
Reply
Workflow Hero

Re: Nintex approval workflow task complete from custom form

Jump to solution

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... 

0 Kudos
Reply
Workflow Hero

Re: Nintex approval workflow task complete from custom form

Jump to solution

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.

0 Kudos
Reply
Workflow Hero

Re: Nintex approval workflow task complete from custom form

Jump to solution

I used all below and giving same error.

ProcessTaskResponse

ProcessTaskResponse2

ProcessTaskResponse3

0 Kudos
Reply
Workflow Hero

Re: Nintex approval workflow task complete from custom form

Jump to solution

Please somebody help. 

0 Kudos
Reply
Workflow Hero

Re: Nintex approval workflow task complete from custom form

Jump to solution

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‌

0 Kudos
Reply