Unlock Payload Process throwing Null Pointer Exception
Hi,
We are upgrading from AEM 6.0 to AEM 6.2 . I see that Unlock Payload Process in the custom workflow is throwing Null Pointer Exception in Dynamic Participant step.
This custom workflow is triggered by a scheduler as below and the session object passed to create the workflow is obtained from serviceResourceResolver.
Can someone suggest how to resolve this.
WorkflowSession wfSession = workflowService.getWorkflowSession(session);
// Get the workflow model
WorkflowModel wfModel = wfSession.getModel(wfModelDefn);
if (wfModel != null) {
// Get the workflow data
// The first param in the newWorkflowData method is the payloadType. Just a fancy name to let it know what type of workflow it is working with.
WorkflowData wfData = wfSession.newWorkflowData("JCR_PATH", absContentPath);
if (wfData != null) {
// Run the Workflow.
wfSession.startWorkflow(wfModel, wfData);
LOG.debug("Workflow started for for mlc review : {}", absContentPath);
}
java.lang.NullPointerException
Unlock Payload Process
com.adobe.granite.workflow.WorkflowException: java.lang.NullPointerException
at com.adobe.granite.workflow.core.advance.ParticipantNodeHandler.doTransition(ParticipantNodeHandler.java:198)
at com.adobe.granite.workflow.core.advance.AdvanceUtil.transitionFrom(AdvanceUtil.java:143)
at com.adobe.granite.workflow.core.WorkflowSessionImpl.completeInternal(WorkflowSessionImpl.java:951)
at com.adobe.granite.workflow.core.job.HandlerBase.complete(HandlerBase.java:507)
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:348)
at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:500)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:291)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:58)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:227)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException