The invokeDDX operation of the Assembler service requires
the following data items as input:
-
A
document
value that represents the
DDX document, provided as the value of the DDX property of the operation.
-
A
map
value that holds the documents to
be assembled, provided as the Input Document Map property of the
operation. The keys for the
map
value are the key
words that the DDX document defines. Each value in the
map
are
either a
document
value that represents a single
PDF document or a
list
of
document
values
for representing multiple PDF documents.
Typically, the PDF documents to assemble are available at run
time as
document
values. In this case, a
map
value
needs to be created and populated with the document values so that
it can be used as the value of the Input Document Map property of
the invokeDDX operation.
The DDX document and the number of PDF documents to assemble
determine whether the
map
value should contain
document
values
or
list
values that hold
document
data
items. For example, the following DDX document is used for the example
process described above.
<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="GeneratedDocument.pdf">
<PDF source="cover"/>
<PackageFiles>
<PDF source="attachments"/>
</PackageFiles>
</PDF>
</DDX>
The DDX document provides the following information about the
documents to assemble:
-
The
<PDF source="cover"/>
element
defines the
cover
key word, which is associated
with the PDF document to use as the cover page.
-
The
<PDF source="attachments"/>
element
defines the
attachments
key word, which is associated
with several PDF documents to assemble.
The
map
value must use
cover
and
attachments
as
keys. The values for the keys must be
list
data
items that hold
document
values:
-
Multiple PDF documents are associated with the
attachments
key
word; therefore, the value for the
attachments
key
needs to be a
list
data item that holds the document
values.
-
Data items in a
map
must be of the same
type; therefore, although only one document is used as a cover page,
the value for the
cover
key needs to be a
list
data
item.
Retrieving the DDX File
In the example process diagram illustrated
previously, the Read DDX File From Repository operation is a Read
Resource Content operation that the Repository service provides:
-
The Resource URI property of the Input property group is
used to specify the location of the DDX document in the repository.
-
The Result property is used to save the retrieved DDX document
in a
document
variable.
Assembling the document
In the example process diagram illustrated
previously, the invokeDDX operation needs to be configured so that
it uses the DDX document that was retrieved from the repository
and the PDF documents that are provided to the process as input data.
-
The value of the DDX property is specified as the value of
the
document
variable that holds the DDX document.
-
The
inputs
property of the Input property
group is used to identify the
map
variable that
stores the documents to assemble:
-
The cover key is
associated with a list variable that contains one document to use
as the cover page of the assembled document.
-
The attachments key is associated with a list variable that
contains all of the other documents that are to be assembled.
-
The value of the Result property of the Output property group
is used to identify the
map
variable that stores
the results of the invokeDDX operation. In this case, because only
one document is assembled, the map includes one key/value pair.
The key is
result
, as it was defined by the
<PDF result="GeneratedDocument.pdf">
element
in the DDX document. The value is a
document
value
that represents the assembled PDF document.