Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Unlock Payload Process throwing Null Pointer Exception

Avatar

Avatar
Validate 1
Level 2
priyac86134686
Level 2

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
priyac86134686
Level 2

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
priyac86134686
Level 2

14-06-2018

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

Replies

Avatar

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

140 likes

Total Posts

543 posts

Correct Reply

165 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

140 likes

Total Posts

543 posts

Correct Reply

165 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile
PuzanovsP
MVP

15-06-2018

Dear Priya,

Are you using LockManager[1] to unlock pages. isLocked and unlock methods which are responsible for unlocking.

Please note if LockManger fails you can always remove Lock's via even lower interface Node[1] method removeMixin and setProperty allow to change lock's.

[1] LockManager (Content Repository for Java Technology API Version 2.0)

Regards,

Peter

Avatar

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

140 likes

Total Posts

543 posts

Correct Reply

165 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile

Avatar
Validate 25
MVP
PuzanovsP
MVP

Likes

140 likes

Total Posts

543 posts

Correct Reply

165 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Contributor 2
Ignite 10
View profile
PuzanovsP
MVP

15-06-2018

Dear Priya,

Are you using LockManager[1] to unlock pages. isLocked and unlock methods which are responsible for unlocking.

Please note if LockManger fails you can always remove Lock's via even lower interface Node[2] method removeMixin and setProperty allow to change lock's.

[1] LockManager (Content Repository for Java Technology API Version 2.0)

[2] Node (Content Repository for Java Technology API Version 2.0)

Regards,

Peter

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,345 likes

Total Posts

3,220 posts

Correct Reply

914 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,345 likes

Total Posts

3,220 posts

Correct Reply

914 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

15-06-2018

Hi,

Could you please try below settings

Workflow lock/ unlock steps not working in AEM 6.3

To apply configurations to allow the Lock/ Unlock processes to function in AEM 6.3, follow these steps:

  Go to http://host:port/system/console/configMgr.

  Find Day CQ Workflow Service.

  Mark Enable Lock/Unlock Process to true.

  Click Save.

  Find Adobe Granite Repository Service User Configuration, and add a new configuration.

  Set Simple Subject Population to true.

  Set Service Users to workflow-process-service.

  Click Save.

Thanks

Arun

Avatar

Avatar
Validate 1
Level 2
priyac86134686
Level 2

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 2
priyac86134686
Level 2

Like

1 like

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
priyac86134686
Level 2

17-06-2018

Issue is fixed.

Root cause for the issue was the participant user was not present in the repository

Error description was misleading , it didn't state like user not found or anything similar.