Combining PDF Attachments with DDX, then send separately with Document of Record in AEM OSGi Workflow | Community
Skip to main content
Level 4
Sep 15, 2020 11:46 PM UTC
Solved

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

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

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. 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
GirishBedekarAccepted solution
Level 8
Sep 23, 2020 11:40 PM UTC

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

59 replies

Level 8
Jan 4, 2021 10:50 PM UTC

Are you able to assemble secured pdf using Acrobat?

Translate
techddxAuthor
Level 4
Jan 4, 2021 11:25 PM UTC
No, I am unable to since it requests for a password when combining
Translate
Employee
Dec 4, 2020 3:26 PM UTC

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 

Translate
techddxAuthor
Level 4
Jan 4, 2021 10:48 PM UTC
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.
Translate
Level 8
Oct 7, 2020 11:13 PM UTC

I have also added bookmarks to the assembled pdf 

open the assembled pdf using Adobe reader and check the bookmarks 

Translate
Employee
Oct 7, 2020 8:34 PM UTC

Here is the latest bundle

https://documentcloud.adobe.com/link/track?uri=urn:aaid:scds:US:6c353e00-1139-48c6-b8b3-5bd4abda5fd5

I have increased the size of my query to 100

Your workflow step should look like this

 

Translate
techddxAuthor
Level 4
Oct 7, 2020 10:44 PM UTC
Hi workflowuser, I tested the new bundle and there are no issues with 20+ attachments. Thank you!
Translate
Level 8
Oct 6, 2020 3:18 PM UTC

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 

Translate
Level 8
Oct 6, 2020 12:17 AM UTC

Is that a common use case of attaching 20 pdf files?

Translate
techddxAuthor
Level 4
Oct 6, 2020 3:15 PM UTC
It is an uncommon use case, but there may be times where there are 20+ attachments.
Translate
GirishBedekarAccepted solution
Level 8
Sep 23, 2020 11:40 PM UTC

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

Translate
Level 8
Sep 23, 2020 8:44 PM UTC

Did you enable the log for the bundle?

check the logs it should give you more information 

Are these attachments all pdf files?

Translate
techddxAuthor
Level 4
Sep 23, 2020 9:27 PM UTC

Hi Girish, yes all attachments are pdf

Translate
techddxAuthor
Level 4
Oct 5, 2020 6:06 PM UTC
Hi Giresh, i was able to resolve the repeating panel issue by adding a subform in the xdp and rewriting the schema. Thank you
Translate
Employee
Sep 22, 2020 8:21 PM UTC

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

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<afData>
<afUnboundData>
<data>
<tableItem11>Testing</tableItem11>
<telephonebill>
<fileAttachment>aa.png</fileAttachment>
</telephonebill>
<Row2>
<bankstatements>
<fileAttachment>adls.png</fileAttachment>
</bankstatements>
</Row2>
<idcard>
<fileAttachment>etrade.PNG</fileAttachment>
</idcard>
</data>
</afUnboundData>
<afBoundData>
<data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"/>
</afBoundData>
<afSubmissionInfo>
<computedMetaInfo/>
<stateOverrides/>
<signers/>
<afPath>/content/dam/formsanddocuments/assembleattachments</afPath>
<afSubmissionTime>20200920124211</afSubmissionTime>
</afSubmissionInfo>
</afData>

Translate