Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Submitting a message to the AEM 5.6.1 Inbox (graceful workflow process step failure)


Level 4


We have implemented a custom workflow process step to perform an operation against an integration.  The particulars aren't important.

Currently, if an error occurs when we call the integration, we throw a workflow exception.  This causes the step to be retried (10 attempts), after which the workflow is halted and a the exception is sent to the AEM inbox (/inbox) as a FailureItem.
We wish to change this behaviour so that the process step is tried only once.  We wish to make it a graceful failure, submitting a message to the inbox (not an email, just the AEM inbox), but continuing on with the workflow.

We have tried a couple different approaches without luck:

  • Using InboxManager (cq-wcm-notification).  This seemed like the best approach, but the bundle doesn't export the necessary packages (as described at https://forums.adobe.com/thread/1156802).  In that three year old thread, Jorg suggests this may be a bug in 5.6.1, though I couldn't find a published hotfix to resolve it.  Is the recommendation still to open a DayCare ticket (or rewrap the bundle with a new manifest)?
  • Duplicating the code in HandlerBase/JobHandler (com.adobe.granite.workflow.core) which creates the inbox item after all retries have been exhausted.  Again, the bundle doesn't export some of the necessary packages for this.

Is there a simple way to achieve this?  Any way to achieve this?

2 Replies