Exception while fetching payload paths using ResourceCollectionHelper.getPaths(path, rcCollections) | Community
Skip to main content
jerinraj5555
Level 3
December 28, 2022
Solved

Exception while fetching payload paths using ResourceCollectionHelper.getPaths(path, rcCollections)

  • December 28, 2022
  • 3 replies
  • 1655 views

I'm trying to fetch active workflows in the instances and their payload but some paths are '/var/workflow/packages/generated-package80' so I've used 

 

 ResourceCollectionHelper.getPaths("/var/workflow/packages/generated-package80", rcCollections) 

 

for getting the content and other associated paths in the package, the above method is working as expected and returns path in WorkFlowProcess. But In Scheduler, I've used the same approach for getting actual payload path from '/var/workflow/packages/generated-package80' but it returns an exception like "Cannot build path list out of the resource collection ".

Need some suggestions to resolve this or Can I use Node Iteration approach?

Hopefully someone can give me some suggestions. thanks

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 jerinraj5555

Thanks all for the suggestions. I've tried the above approaches but it wasn't working for me and after some research on the generated-package in /var, I found the paths are stored under contentRootPaths. So the below code snippet gets the whole path for me.

workItem.getWorkflowData().getMetaDataMap().get("contentRootPaths");

 

3 replies

arunpatidar
Community Advisor
Community Advisor
December 28, 2022

Hi,

Can you please check if this is because of access rights?

Arun Patidar
jerinraj5555
Level 3
December 28, 2022

Yes, the user has all the access rights/permissions.

DEBAL_DAS
New Member
December 28, 2022

Could you please share your code so that I can give a try from my end.

 

Thanks,

Debal

Debal Das, Senior AEM Consultant
Mani_kumar_
Community Advisor
Community Advisor
December 28, 2022

Can you also check the resourcersolver object which you are using in both workflow and scheduler is it same or different

Better to use service resolver in both cases having same ACLs

 

jerinraj5555
jerinraj5555AuthorAccepted solution
Level 3
January 22, 2023

Thanks all for the suggestions. I've tried the above approaches but it wasn't working for me and after some research on the generated-package in /var, I found the paths are stored under contentRootPaths. So the below code snippet gets the whole path for me.

workItem.getWorkflowData().getMetaDataMap().get("contentRootPaths");