Complete a task using API with form variables values

Hi Experts,


We have a scenario to complete a task programmatically by providing a value to form variables (e.g. comments).


Have gone through the API documentation(Complete a task | Nintex Workflow Cloud). However, there is no explanation to provide value to form variables.


In our case, we need to complete the task with automated comments. How can we achieve this using Nintex workflow cloud API?


Thanks & Regards

Mohan Raj S



Labels: (1)
0 Kudos
2 Replies
Nintex Employee
Nintex Employee

Re: Complete a task using API with form variables values

@RajaSR Currently there is no way to provide a comment when completing the a task via the API. You could suggest this as a feature enhancement on the uservioice(https://uservoice.nintex.com).

0 Kudos

Re: Complete a task using API with form variables values

Hi @RajaSR 

I've done a little bit of work with the API and basically you can only send through the outcome.


As @leighburke just mentioned you can try user voice.


If you are expecting to use an API to complete tasks on behalf of users and you have custom fields on the task form then you could try the following. It's a bit clunky and add some extra steps.


  1. Have some where to record the outcome of tasks, eg a sharepoint list with field task outcome and task comments. (SQL table could also work, etc)
  2. When the task is completed in the workflow by the user, use a set condition for task outcome to equal what you expect from the user. Within the set condition use a sharepoint update item action to set the outcome comments in the item fields.
  3. Use an API or NWC component workflow to update the sharepoint list items with the outcome and comments.
  4. If the task is completed by the API, use an outcome other than what the user will enter. That way the list item update from step 2 is not performed. 
  5. Back in the main workflow, as the task has completed the workflow will move forward.
  6. Use a sharepoint query list action to re-read the values for outcome and completed.
  7. Continue the workflow as normal.

Like I said its a bit clunky you need to store the information outside of the NWC workflow so that that it can be updated independently of the WF.


0 Kudos