Email Download Artifacts OOTB Workflow Model | Community
Skip to main content
Adobe Employee
December 7, 2022
Solved

Email Download Artifacts OOTB Workflow Model

  • December 7, 2022
  • 2 replies
  • 1997 views

 

Hi Team,

 

We are using OOTB Email Download Artifacts workflow model in our Assets and observed workflow instance is long running and not completed. From error logs we are seeing "Download Id must not be null".

07.12.2022 18:38:35.214 *ERROR* [sling-threadpool-253fff3f-c477-48a8-a28b-c3a512bbd752-(apache-sling-job-thread-pool)-22-Granite Workflow External Process Job Queue(com/adobe/granite/workflow/external/job/var/workflow/models/dam/email-download-artifacts)] com.adobe.granite.workflow.core.job.ExternalProcessJobHandler Unable to load progress of download 'null' as user 'admin' : Error inflating progress of download 'null' : Download id must not be null
com.adobe.granite.workflow.WorkflowException: Unable to load progress of download 'null' as user 'admin' : Error inflating progress of download 'null' : Download id must not be null
at com.adobe.cq.dam.download.impl.email.EmailDownloadArtifactsProcess.execute(EmailDownloadArtifactsProcess.java:132) [com.day.cq.dam.cq-dam-download:1.0.98]
at com.adobe.granite.workflow.core.job.ExternalProcessJobHandler.process(ExternalProcessJobHandler.java:149) [com.adobe.granite.workflow.core:2.1.80]
at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502) [org.apache.sling.event:4.3.6]
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:351) [org.apache.sling.event:4.3.6]
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60) [org.apache.sling.event:4.3.6]
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:287) [org.apache.sling.event:4.3.6]
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: com.adobe.cq.dam.download.impl.storage.DownloadStorageException: Error inflating progress of download 'null' : Download id must not be null
at com.adobe.cq.dam.download.impl.storage.jcr.JcrDownloadStorageService.getProgress(JcrDownloadStorageService.java:619) [com.day.cq.dam.cq-dam-download:1.0.98]
at com.adobe.cq.dam.download.impl.DownloadServiceImpl.getProgress(DownloadServiceImpl.java:363) [com.day.cq.dam.cq-dam-download:1.0.98]
at com.adobe.cq.dam.download.impl.email.EmailDownloadArtifactsProcess.execute(EmailDownloadArtifactsProcess.java:122) [com.day.cq.dam.cq-dam-download:1.0.98]
... 8 common frames omitted
Caused by: java.lang.IllegalArgumentException: Download id must not be null
at com.adobe.cq.dam.download.impl.storage.jcr.JcrDownloadStorageService.getDownloadResource(JcrDownloadStorageService.java:916) [com.day.cq.dam.cq-dam-download:1.0.98]
at com.adobe.cq.dam.download.impl.storage.jcr.JcrDownloadStorageService.getProgress(JcrDownloadStorageService.java:539) [com.day.cq.dam.cq-dam-download:1.0.98]
... 10 common frames omitted

 

Any pointers or solution how to fix this issue.

 

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 krati_garg

@thanikon 
Well I decompiled the Jar for this exception, it is looking for download id which must be available at var/dam/downloads

See the screen shot for the code snippet:

 

This Workflow can also be triggered when, on author console an Asset is downloaded with email checkbox selected, it then asks to add a user from AEM Users, who is supposed to receive the email. If this User does not contain any email Id, it will give same exception as above, because without a User with emailId, this download will fail and nothing will appear under var/dam/downloads.

 

So precisely you will have to download the artifact with User that is carrying an email Id.

 

2 replies

krati_garg
Adobe Employee
Adobe Employee
December 7, 2022

@thanikon Can you please add a screen shot of this OOTB Workflow Model - I am not able to locate it?

Also, please add how this workflow is being triggered. Is it Launching programmatically or via Workflow Launcher

thanikonAdobe EmployeeAuthor
Adobe Employee
December 7, 2022

Thanks you for the response. Here is the path of the model :: http://localhost:4502/editor.html/libs/settings/workflow/models/dam/email-download-artifacts.html.

And we were triggering the workflow manually on an individual asset and also tried it in the parent path (/content/dam).

krati_garg
Adobe Employee
krati_gargAdobe EmployeeAccepted solution
Adobe Employee
December 8, 2022

@thanikon 
Well I decompiled the Jar for this exception, it is looking for download id which must be available at var/dam/downloads

See the screen shot for the code snippet:

 

This Workflow can also be triggered when, on author console an Asset is downloaded with email checkbox selected, it then asks to add a user from AEM Users, who is supposed to receive the email. If this User does not contain any email Id, it will give same exception as above, because without a User with emailId, this download will fail and nothing will appear under var/dam/downloads.

 

So precisely you will have to download the artifact with User that is carrying an email Id.

 

Adobe Employee
December 7, 2022

what is your payload , link sharing some assets or single asset with all renditions ? Is it on author - which version ? Are u trying to use link share ?

thanikonAdobe EmployeeAuthor
Adobe Employee
December 7, 2022

Thank you for the reply @digarg17 . Our payload path is /content/dam or we are also using it in the individual asset. We are using AEM CS and it is in author.

Adobe Employee
December 8, 2022

You may check -  it only happening in case of asynchronous downloads or even in case of direct download of assets .

Async download happens when

- there are more than ten assets

  • If the download size is more than 100 MB
  • If the download takes more than 30 seconds to prepare

I am able to successfully run this workflow locally on cloud as well as AMS so it runs as expected , need to check use case where it fails for you  What is the size of assets or no of asset you are running this workflow on? Are you able to see the download ready in your inbox notification?Check this :-https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/manage/download-assets-from-aem.html?lang=en