Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Save Attachment to File System


Level 2


I searched the forum for a solution but couldn't find one.

I have a process that get assigned and attachments get attached all the way through the approval process. I have a sub process that saves to a SQL Database and a Sub Process that save to a file system. My question is how do I get the attachments that traveled through the approval process to be part of the PDF file that get saved to the file system.

Also any insights on how to make that BLOB save to the database too.

Any help would be greatly appreciated.

1 Reply


Level 5


The most direct way is to create a MAP type variable.

Add your PDF, and the attachments to the MAP, while also composing a Document Description XML (DDX).

( More info here: http://help.adobe.com/en_US/livecycle/9.0/ddxRef.pdf  ).

Then invoke the AssemblerService/InvokeDDX and pass in the DDX and MAP.

An AssemblerResult variable is the output, and you can retrieve your finished document from that.

Hope this helps.