I am getting exception when i run workflow outside of project console | Community
Skip to main content
New Participant
July 27, 2021
Solved

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

  • July 27, 2021
  • 2 replies
  • 2035 views

Hi Team,

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

 

 

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

.  

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Vijayalakshmi_S

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-projects.html?lang=en

 

 

2 replies

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
New Participant
July 27, 2021

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-projects.html?lang=en

 

 

diksha_mishra
New Participant
July 27, 2021

@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.

 

New Participant
July 27, 2021

@diksha_mishra 
I am able to start workflow correctly
I am looking for 2nd error
 
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