Expand my Community achievements bar.

SOLVED

I am getting exception when i run workflow outside of project console

Avatar

Level 2

Hi Team,

I created workflow model used create role project task participent step, when run workflow its throwing exception.

 

Screenshot 2021-07-09 at 1.34.29 PM.pngScreenshot 2021-07-27 at 6.50.02 PM.pngScreenshot 2021-07-27 at 6.50.20 PM.pngScreenshot 2021-07-27 at 6.50.44 PM.png

 

I am trying to run workflow model  out side of project console

Ex: http://localhost:4502/mnt/overlay/dam/gui/content/collections.html/content/dam/collections

http://localhost:4502/assets.html/content/dam

Screenshot 2021-07-27 at 6.51.53 PM.png.  Screenshot 2021-07-27 at 7.03.07 PM.png

com.adobe.granite.workflow.WorkflowException: Process execution resulted in an error
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:201)
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:271)
at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
at com.adobe.cq.projects.impl.workflow.ProjectTaskWorkflowProcess.execute(ProjectTaskWorkflowProcess.java:134)
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:195)
... 8 more

@Dipti_Chauhan @arunpatidar  @Vijayalakshmi_S   @markus_bulla_adobe   

Thanks
Kotireddy

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @kotireddy4b1,

ProjectTaskWorkflowProcess logic adapts the project path resource to Project type (com.adobe.cq.projects.api.Project). 

Given that it is executed outside the project console independently, we have an Exception. (In particular, NPE)

You can try creating a custom project as illustrated in the below doc (have the Task creation as part of Workflow within the created custom Project)

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/projects/develop-aem-pro...

 

 

View solution in original post

3 Replies

Avatar

Community Advisor

@kotireddy4b1 the first error indicates you have selected too many assets in your collection. Can you please try selecting 10 assets, create a test collection and then initiate the workflow again?

AEM OOTB allows to run a workflow on max 15 assets. Please share your findings afterwards.

 

Avatar

Level 2

@diksha_mishra 
I am able to start workflow correctly
I am looking for 2nd error
Screenshot 2021-07-27 at 7.03.07 PM.png 
com.adobe.granite.workflow.WorkflowException: Process execution resulted in an error
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:201)
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:271)
at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
at com.adobe.cq.projects.impl.workflow.ProjectTaskWorkflowProcess.execute(ProjectTaskWorkflowProcess.java:134)
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:195)
... 8 more

Avatar

Correct answer by
Community Advisor

Hi @kotireddy4b1,

ProjectTaskWorkflowProcess logic adapts the project path resource to Project type (com.adobe.cq.projects.api.Project). 

Given that it is executed outside the project console independently, we have an Exception. (In particular, NPE)

You can try creating a custom project as illustrated in the below doc (have the Task creation as part of Workflow within the created custom Project)

https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/projects/develop-aem-pro...