How can I delete any tasks created from Task App?

cancel
Showing results for 
Search instead for 
Did you mean: 
jigir_shah
Active Member

How can I delete any tasks created from Task App?

Hello,

I am using Alfresco Process Services Enterprise 1.9 version. Now, I haven't created any App or Process definitions. 

I navigated to 'Task App' and started Tasks using 'CREATE TASK' button. I can see this task in My Tasks and I completed it to as well. I have few tasks in My tasks as well as in Completed tasks.

 

Now, I want to delete all these tasks. How can I do this using any OOTB API? Is there a way I can delete?

I tried deleting these tasks using DELETE /enterprise/tasks/{taskId} API. However, it is giving me below error.

While deleting completed tasks: i got this error.

{
"message": "Only checklist tasks can be deleted",
"messageKey": "GENERAL.ERROR.BAD-REQUEST"
}

 

While deleting In-Progress tasks: I got this.

{
"message": "Task with id: <id> does not exist",
"messageKey": "GENERAL.ERROR.NOT-FOUND"
}
 
I would like to cancel all these tasks anyhow. Please help.
 
 

Thanks,

Jigir Shah

1 Reply
abbask01
Senior Member

Re: How can I delete any tasks created from Task App?

You can create your custom API to delete tasks using the taskService.deleteTasks(Collection<String> taskIds, boolean cascade)  (you might need to end it before deleting)

Regards,
Abbas