Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Add custom options in cq:inbox for workflows

Avatar

Level 2

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.

ArindamCh_0-1755541862867.png


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.

 

2 Replies

Avatar

Community Advisor

Hi @ArindamCh,

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

AEM BlogsLinkedIn


Avatar

Level 2

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