cancel
Showing results for 
Search instead for 
Did you mean: 

Why there is no complete task function in WorflowApi?

kodermax
Star Contributor
Star Contributor

I can't see complete task function in API?

6 REPLIES 6

afaust
Legendary Innovator
Legendary Innovator

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.

kodermax
Star Contributor
Star Contributor

afaust
Legendary Innovator
Legendary Innovator

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.

kodermax
Star Contributor
Star Contributor

There is no approve and reject function.

afaust
Legendary Innovator
Legendary Innovator

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.

kodermax
Star Contributor
Star Contributor

Thank you.