I can't see complete task function in API?
Which API? ReST, Java, JavaScript (server-side), JavaScript (client-side, e.g. NPM module "alfresco-js-api")?
If you want meaningful help please be a bit more elaborate on your questions.
This Alfresco Content Services REST API Explorer
WorkflowApi
That is the new v1 ReST API. It allows to complete a task by performing an update on it via a PUT request on /tasks/{taskId}. See the details of that operation on how to transition / complete / claim a task.
There is no approve and reject function.
Of course not. "Approve" and "Reject" are just arbitrary outcomes and each workflow / task may have very different outcomes. The outcome of a task is determined by an update to the corresponding task variable that needs to be set as part of the update.
Keep in mind that it is the Alfresco Share UI "fakes" those "Approve" / "Reject" decision buttons, but technically it does nothing special except update the task variable and simply "complete" the task.
Thank you.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.