Reference: Document Accessor Helper Object
Useful Functions
Name | Arguments | Return Value Type | Notes |
|---|---|---|---|
getData
| Integer index | Source | Retrieves the document at the specified zero-based index. Use in
combination with the message.setMessage helper function
to populate the current message with the retrieved data in a
memory-efficient manner. Example: this code populates the current
message with a UTF-8 XML message retrieved from the first
attachment:
Results in an error if there's no integration attachment
with the specified index. |
String filename | Source | Retrieves the document with the specified filename. Use in
combination with the message.setMessage helper function
to populate the current message with the retrieved data in a
memory-efficient manner. Example: this code populates the current
message with a UTF-8 XML message attachment with the name
input.xml:
Results in an error if there's no integration attachment
with the specified filename. | |
getDocumentIndexes
| List<String> labels | List<Integer> | Returns a Java List of integers giving the indexes of documents
tagged with all of the specified labels. Note that if one of
the labels is ‘*’ then any label is matched and the function returns
all indexes for documents with at least 1 label. |
getDocsMatching
| List<String> | List<Source> | Retrieves documents tagged with all of the specified labels. Workday stores documents smaller than 100 KB in memory and larger
documents on disk. Be aware of runtime memory and disk space
limits. |
String label | Source | Retrieves documents tagged with the specified label. Label here means integration attachment label. Synonymous with
document tag. | |
String[] labels | Source | Retrieves documents tagged with all of the labels in the string
array. | |
getFileName
| Integer index | String | Retrieves the filename with the specified index. |
String label | List<String> | Retrieves a Java List of the filenames of all the documents tagged
with the specified label. | |
List<String> labels | List<String> | Retrieves a Java List of the filenames of all the documents tagged
with the specified labels. | |
String label, integer index | String | Retrieves the nth filename of all the documents tagged with the
specified label. Functionally equivalent to this
code: In most cases, you must use da.getFileNames(label) to find
the number of matching filenames before you can use an index. The
only exception is the limited case where you require the first (zero
index) value. | |
List<String> labels, integer index | String | Retrieves the nth filename of all the documents tagged with the
specified labels. Functionally equivalent to this
code: In most cases, you must use da.getFileNames(labels) to
find the number of matching filenames before you can use an index.
The only exception is the limited case where you require the first
(zero index) value. | |
String[] labels, integer index | Retrieves the nth filename of all the documents tagged with the
specified labels. Functionally equivalent to this
code: In most cases, you must use da.getFileNames(labels) to
find the number of matching filenames before you can use an index.
The only exception is the limited case where you require the first
(zero index) value. | ||
hasFile
| String filename | Boolean | Determines whether there's an integration attachment with the
specified filename. |
String label, String filename | Boolean | Determines whether there's an integration attachment with the
specified filename and tagged with the specified label. | |
List<String> labels, String filename | Boolean | Determines whether there's an integration attachment with the
specified filename and tagged with all of the labels in the
list. | |
sort
| String order | None | Sorts the attached documents by filename. Valid order values are:
|
size
| None | Integer | Returns the number of attached documents. |
List<String> labels | Integer | Returns the number of documents tagged with all of the specified
labels. | |
String label | Integer | Returns the number of documents tagged with the specified
label. | |
String[] labels | Integer | Returns the number of documents tagged with all of the labels in
the string array. | |
toVar
| Integer index, String var_name | MessageVariable | Retrieves the document at the specified index and places it in a
memory-efficient manner into the specified assembly variable.
Example:
|
String filename, String var_name | MessageVariable | Retrieves the document with the specified filename and places it in
a memory-efficient manner into the specified assembly variable.
Example:
|