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


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


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=""> 
    <PDF result="Attachments.pdf"> 
         <PDF source="fileAttachment"/> 



Input map for invoke ddx:

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


Output map:

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


Send Email step with Document of Record and attachments document:



 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. 



1 Accepted Solution


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

5 Replies



here is the updated bundle

I also removed the system.out.println  statements and moved them to log.debug. If you want to see the logs you can enable debug logs for this bundle


Level 4
Hi workflowuser, I think i may have found a bug. When you use an xml schema as the adaptive form model, the repeating panel method to add attachments generates an empty ddx file. Using a single file attachment button still works however.


can you paste the Data.xml contents from your workflow payload path after the form is submitted.


Level 4
Sorry, how do you access the Data.xml after form submission? Is it through the CRX?


Level 4
<?xml version="1.0" encoding="UTF-8"?> <afData> <afUnboundData> <data/> </afUnboundData> <afBoundData> <formData xmlns:xfa="" xmlns:xsi=""> <processingInfo> <contractor/> <contractorEmail/> <contractAgency/> <contractAgencyEmail/> </processingInfo> <stdAgreementDetails> <scoID/> <agreementNumber/> <purchaseAuthNumber/> <startDate/> <endDate/> <maxAmount/> <exemption/> </stdAgreementDetails> <contractorInfo> <contractorName/> <printedName/> <contractorTitle/> <contractorBusinessAddr/> <city/> <state/> <zip/> </contractorInfo> <contractAgencyInfo> <contractAgencyName/> <printedName2/> <agencyNameTitle/> <contractAgencyAddress/> <contractCity/> <contractState/> <contractZip/> </contractAgencyInfo> <exhibitsTable> <Row1> <ExhibitA/> <TitleA/> <PageA/> </Row1> <Row2> <ExhibitB/> <TitleB/> <PageB/> </Row2> <Row3> <ExhibitC/> <TitleC/> <PageC/> </Row3> <Row4> <ExhibitD/> <TitleD/> <PageD/> </Row4> </exhibitsTable> </formData> </afBoundData> <afSubmissionInfo> <computedMetaInfo/> <stateOverrides/> <signers/> <afPath>/content/dam/formsanddocuments/assembleattachmentsoriginalwithschema</afPath> <afSubmissionTime>20200922121748</afSubmissionTime> </afSubmissionInfo> </afData>


Level 4

and fyi, the attachments are all in the attachments folder in the payload


in the Data.xml, I do not see any fileattachment nodes. where are the attachments?


Level 4
Hi workflowuser, is there a cap on the number of attachments? I am testing the bank statements repeating panel. When i attach 20 attachments, the ddx is no longer generated.



in your crx go to 

/var/fd/dashboard/payload/server0/<latest Date>/<mostrecentfolder>/



Level 4
Thanks, i found the payload path. How do I retrieve the Data.xml contents?



your Data.xml should look something like this. It should have fileAttachment elements in it

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<data xmlns:xfa=""/>


Level 4
Hi Giresh, i was able to resolve the repeating panel issue by adding a subform in the xdp and rewriting the schema. Thank you


Level 4
It still does not work when there are 20 or more attachments.


Level 9

Did you enable the log for the bundle?

check the logs it should give you more information 

Are these attachments all pdf files?


Level 4

Here is a portion of the Data.xml after form submission:




<?xml version="1.0" encoding="UTF-8"?>
        <formData xmlns:xfa="" xmlns:xsi="">



All 20 attachments appear in the Data.xml, but the pdf is not assembled. The same problem happens with the repeating bankstatement panels in the bundle



Level 9
You will need to change the parameter in the workflow step to reflect your attachment element