API to modify Tasks | Community
Skip to main content
June 13, 2023

API to modify Tasks

  • June 13, 2023
  • 1 reply
  • 757 views

I'm creating an inbox replacement to deal with the massive number of asyncrollout messages we get.  Unfortunately the url the existing inbox uses,. /libs/granite/taskmanager/updatetask , looks like it's restricted to what can call it and throws a 403 Forbidden when called outside of the AEM inboxes.  Are there any APIs to modify the status of a task in the same way there are ones to modify a workflow?  Anything I can do to open up access to the taskmanager calls?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

MayurSatav
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 14, 2023

Hi @ben_hp ,

 

Instead of directly accessing the /libs/granite/taskmanager/updatetask URL, you can use the TaskManager API provided by AEM.

Task task = taskManager.getTask(taskId); if (task != null) { // Update the task's state task.setState(newState); // Save the changes taskManager.updateTask(task); }
ben_hpAuthor
June 14, 2023

Does AEM provide an actual implementation of the TaskManager API out of the box?  All I can see is the interface.  Anyway our answer ended up being to just write a servlet to change a task's status.