Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Combining PDF Attachments with DDX, then send separately with Document of Record in AEM OSGi Workflow

Avatar

Level 4

I have a dynamic number of pdf attachments as input from an adaptive form, and would like to merge all attached pdfs into a single pdf using DDX, then have it send separately with the Document of Record with the Send Email step. However I encountered an issue with the Send Email step with the following: 

 

Caused by: com.adobe.granite.workflow.WorkflowException: GetPropertyValue failed as value corresponding to VARIABLE:attachments for type class java.lang.Object is NULL

 

 

The DDX is as follows:

 

<DDX xmlns="http://ns.adobe.com/DDX/1.0/"> 
    <PDF result="Attachments.pdf"> 
         <PDF source="fileAttachment"/> 
    </PDF> 
</DDX>

 

 

Input map for invoke ddx:

The "attachment" path matches the output attachment folder of the adaptive form

techddx_0-1600213093578.png

Output map:

The output document is saved into the "attachments" document variable

techddx_1-1600213301535.png

Send Email step with Document of Record and attachments document:

techddx_2-1600213476906.png

 

 I am unsure why the value for attachments is NULL. Any help on this is appreciated, thank you!

 

EDIT - testing workflowuser's process:

The following is the dynamic table with file attachments. The ordering is PDFs 1,2,3,4, but the resultant PDF from the process gives ordering 2,3,4,1. 

techddx_0-1600299274726.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 9

please log a support ticket with Adobe if you are having problems with 20 or more attachments in the form

View solution in original post

1 Reply

Avatar

Level 4

I have changed the arguments, and i still get the issue. It works when there are 18 attachment elements, but not when there are more.

techddx_0-1600904073390.png

The same problem happens in the repeating bankstatements panel. It works when there are less than 20 attachments

techddx_0-1600904263431.png

 

 

Avatar

Correct answer by
Level 9

please log a support ticket with Adobe if you are having problems with 20 or more attachments in the form

Avatar

Level 4
It is an uncommon use case, but there may be times where there are 20+ attachments.

Avatar

Employee
I think I found the problem. it was in my code. I was limiting my search to 20 . I can change the max search results to 100 and give you the updated bundle if you need

Avatar

Level 9

As a workaround have two repeating panel’s. The first panel you can allow users to add a maximum of say 12 attachments 

In the second panel they can add another 8 attachments and submit the form 

this is working for me 

Avatar

Level 4
Hi workflowuser, I tested the new bundle and there are no issues with 20+ attachments. Thank you!

Avatar

Level 4
Hi workflowuser, is it possible to make a slight change to the bundle? Currently, the process only supports the assembly of static document, and breaks when a dynamic document is attached. From the DDX reference guide, it suggests the use of the NoForms element as the child of the PDF element. Is it possible for you to add the NoForms element to each PDF element, so the bundle supports dynamic documents as well? Thank you for all your help.

Avatar

Level 9

I have also added bookmarks to the assembled pdf 

open the assembled pdf using Adobe reader and check the bookmarks 

Avatar

Employee

The updated custom bundle  which allows you to assemble xfa based form is now available and can be downloaded from here

custom bundle

 

The entire article is available on experience league 

Avatar

Level 4
Thank you! This is unrelated, but is it possible for secured PDFs to be merged with DDX without their passwords? The use case would be similar to Adobe Sign, where all attachments can be rendered and merged regardless if they are secured or not.

Avatar

Level 4
No, I am unable to since it requests for a password when combining

Avatar

Employee
we can add it as a package of documents, but not assemble together