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

Descargar

Esta obra está autorizada con arreglo a la licencia de Reconocimiento-NoComercial-CompartirIgual 3.0 Unported de Creative Commons.  Los términos de Creative Commons no cubren las publicaciones en Twitter™ y Facebook.

Avisos legales   |   Política de privacidad en línea