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
BedrockMission!

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

Avatar

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
Level 2
techddx
Level 2

Likes

12 likes

Total Posts

65 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
techddx
Level 2

15-09-2020

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

 

View Entire Topic

Avatar

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

133 likes

Total Posts

443 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 5
Employee
workflowuser
Employee

Likes

133 likes

Total Posts

443 posts

Correct Reply

70 solutions
Top badges earned
Ignite 5
Ignite 3
Ignite 1
Give Back 50
Give Back 5
View profile
workflowuser
Employee

21-09-2020

here is the updated bundle

https://documentcloud.adobe.com/link/track?uri=urn:aaid:scds:US:a9005085-7f50-4876-af8a-49a25c81b69e

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

techddx
This is perfect, thank you!
techddx
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.
workflowuser
can you paste the Data.xml contents from your workflow payload path after the form is submitted.
techddx
Sorry, how do you access the Data.xml after form submission? Is it through the CRX?
techddx
<?xml version="1.0" encoding="UTF-8"?> <afData> <afUnboundData> <data/> </afUnboundData> <afBoundData> <formData xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <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>
techddx

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

workflowuser
in the Data.xml, I do not see any fileattachment nodes. where are the attachments?
techddx
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.