CQ5.3: Moved workflow payload breaks the workflow-inbox

Problem

When an active workflow's payload is moved or deleted then the workflow inbox will always show empty even when there are work items pending. When this happens, you will see an error in the error.log like the one below.

*ERROR* [164.39.7.84 [1277376827098] GET
/libs/cq/workflow/content/console/inbox.json HTTP/1.1]
org.apache.sling.engine.impl.SlingMainServlet service: Uncaught SlingException
java.lang.NullPointerException
at com.day.cq.collab.commons.impl.CommentJcrPathBuilder.buildPath(CommentJcrPathBuilder.java:47)
at com.day.cq.workflow.ui.impl.JcrPathBuilderManagerImpl.getPath(JcrPathBuilderManagerImpl.java:47)
at org.apache.jsp.libs.cq.workflow.components.console.inbox.json_jsp._jspService(json_jsp.java:192)
at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Resolution

This issue only appliles to CQ5.3.

To fix the issue, either install the attached package or overlay /libs/cq/workflow/components/console/inbox/json.jsp as follows:

...
for (int i=0; i<items.length; i++) {
WorkItem wi = items[i];
// add the following check
if(wi.getWorkflowData().getPayloadType().equals("JCR_PATH")) {
try {
if (!session.itemExists((String)wi.getWorkflowData().getPayload())) {
continue;
}
} catch (RepositoryException ace) {
continue;
}
}

// end
if (!isAllowedToReadPayload(wi, session)) {
continue;
}
...

This ensures that all subsequent workitems will be displayed (except the failing ones).

Applies to

CQ 5.3

다운로드

 Adobe

쉽고 빠르게 지원 받기

신규 사용자이신가요?

Adobe MAX 2024

Adobe MAX
크리에이티비티 컨퍼런스

10월 14~16일 마이애미 비치 및 온라인

Adobe MAX

크리에이티비티 컨퍼런스

10월 14~16일 마이애미 비치 및 온라인

Adobe MAX 2024

Adobe MAX
크리에이티비티 컨퍼런스

10월 14~16일 마이애미 비치 및 온라인

Adobe MAX

크리에이티비티 컨퍼런스

10월 14~16일 마이애미 비치 및 온라인