Expand my Community achievements bar.

SOLVED

Email Download Artifacts OOTB Workflow Model

Avatar

Level 3

 

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,

 

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

krati_garg_0-1670494990532.png

 

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.

krati_garg_2-1670495331429.png

 

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

 

View solution in original post

8 Replies

Avatar

Employee Advisor

@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

Avatar

Level 3

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.

thanikon_0-1670439400394.png

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

Avatar

Correct answer by
Employee Advisor

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

krati_garg_0-1670494990532.png

 

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.

krati_garg_2-1670495331429.png

 

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

 

Avatar

Level 3

Thank you @krati_garg . I have followed the steps mentioned above and now i am able to see this working.

Avatar

Employee

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 ?

Avatar

Level 3

Thank you for the reply @digarg . 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.

Avatar

Employee

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=enScreenshot 2022-12-08 at 3.23.54 PM.png

Avatar

Level 3

Thank you for sharing the details @digarg . I am going thru the url shared and will check my issue based on the details mentioned in the technical document.