Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Assembling documents with list input: (DDX didnot pass the basic validation)

Avatar

Former Community Member

I have a list of documents as input. I just want to assemble them to a single output. I know that DDX can't handle lists and we should use map objects for them.

Do we ned to dynamically generate DDX by first looping through each document, creating a key for each doc as mentioned in our standard sample? or can we assign the list to a map and give it as input in the document map? ( I read this in one of our forum threads and I tried configuring it)

I did this way:

Defined variable types:

pdfdocsinput - list, subtype - document (input parameter)

inputmapdocument - map, subtype - list

assembler_result - AssemblerResult

In setmethod process:

/processdata/inputmapdocument[@id="pdflist"]  = /processdata/pdfdocsinput

In invokeDDX:

InputDocumentMap - /process_data/inputmapdocument

output - /process_data/assembler_result/object/documents

In DDX:

<PDF result='out.pdf'/>

<PDF source = 'pdflist'/>

I understand that I'm doing wrong somewhere..but cannot able to make out where exactly is the fault.

Please help me on this. I attached my LCA as well.

--Chaitanya

2 Replies

Avatar

Level 8

Yes Assembler can handle lists of documents.  In the DDX create a PDF source and give it a name e.g. <PDF source="mysource">.

Then in the invoke DDX properties sheet, where you map documents to the source, give it the list (instead of a single document).  Assembler will execute the operation on all items in the list - that is you get one big assembled document.