Add custom options in cq:inbox for workflows | Community
Skip to main content
Level 3
August 18, 2025
Question

Add custom options in cq:inbox for workflows

  • August 18, 2025
  • 1 reply
  • 336 views

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.

 

1 reply

SantoshSai
Community Advisor
Community Advisor
August 18, 2025

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:

    1. 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 } }
    2. 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:

    /libs/cq/inbox/gui/components/inbox/tasklist/actions → /apps/cq/inbox/gui/components/inbox/tasklist/actions
  • 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.

Santosh Sai
ac4320Author
Level 3
September 2, 2025

@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.