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

다운로드

이 작업에는 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License의 라이센스가 부여되었습니다.  Twitter™ 및 Facebook 게시물은 Creative Commons 약관을 적용받지 않습니다.

법적 고지 사항   |   온라인 개인 정보 보호 정책