What is the difference between Submit Task Form vs Complete REST endpoints?

Hi, Please provide more light on what exactly happens when I submit Task Form vs Complete Task…

I tried reading here and couldn’t understand completely.

https://docs.camunda.org/manual/7.3/api-references/rest/#task-submit-task-form

-Rohit

Complete a task and update process variables using a form submit. There are two difference between this method and the complete method:

If the task is in state PENDING - ie. has been delegated before, it is not completed but resolved. Otherwise it will be completed.

If the task has Form Field Metadata defined, the process engine will perform backend validation for any form fields which have validators defined. See the Generated Task Forms section of the User Guide for more information.

https://docs.camunda.org/manual/7.5/reference/rest/task/post-submit-form/

Hey Stephen,

As I mentioned I tried reading the same thing but couldn’t understand what “If the task is in state PENDING - ie. has been delegated before, it is not completed but resolved. Otherwise it will be completed.” means.

Can you please elaborate more on this point? What is the relation of this with Complete/Submit Task form?

Hi @rusiarohit

Have a look at “delegateTask”, “resolveTask” methods from below link

https://docs.camunda.org/javadoc/camunda-bpm-platform/7.3/org/camunda/bpm/engine/TaskService.html

delegateTask
Delegates the task to another user. This means that the assignee is set and the delegation state is set to DelegationState.PENDING. If no owner is set on the task, the owner is set to the current assignee of the task. The new assignee must use resolveTask(String) to report back to the owner. Only the owner can complete the task

Thanks @hassang! It helps a lot. Now I am pretty clear. Thanks!