We have started a workflow and assigned it to some user/group. Now, the notification goes to the respective user/group and they can view it by clicking on the bell icon.
Now in inbox where we have the assigned tasks - there are some inbuilt options like "Complete", "Payload" etc that comes up when any workflow related task is selected. Refer to the following image for further clarity.
Now, my requirement is to have custom options put in here as well - something like "Reject" which will straight away remove the task from the queue and send it back to the initiator of the workflow (author). And another one should be "Archive" which will basically have the page (if published) unpublished and then save it in some folder named Archive.
Need some help on how to implement this.
Views
Replies
Total Likes
Hi @ac4320,
Which version are you on AEM as a Cloud Service or AEM 6.5?
Because the way to add custom Inbox actions (Reject, Archive) differs:
For Cloud
Inbox UI is React-based → you cannot overlay /libs/.../actions.
Here is what you can do:
Implement an OSGi service:
@Component(service = WorkflowActionHandler.class,
property = {"workflow.action.name=REJECT"})
public class RejectActionHandler implements WorkflowActionHandler {
@Override
public void handleAction(Session session, String[] workItemIds,
WorkflowAction action, Map<String, Object> params) throws WorkflowException {
// terminate or reroute workflow, notify initiator
}
}Do the same for "ARCHIVE" → unpublish via Replication API, move page to /content/archive/....
I expect - buttons will auto-appear in Inbox once action handlers are registered.
For On-Prem
Still possible to overlay:
Add a JSON action definition (reject.json, archive.json) to show new buttons.
Backend logic handled by custom WorkflowActionHandler (same as above).
Related Reference
The approach of adding buttons to Touch UI toolbars is explained here: Medium Article.
It’s not Inbox-specific, but shows how UI actions are extended in AEM.
@SantoshSai - I am unable to import
WorkflowActionHandler.class
Where exactly is this class residing (in which package )?
Tried looking into import com.adobe.cq.workflow.exec.WorkflowActionHandler; and import com.adobe.granite.workflow.exec.WorkflowActionHandler;
in both scenarios this cannot be resolved.
Views
Replies
Total Likes
Views
Likes
Replies