public interface DocumentDownloadService
ExecutionContext
DocumentDownloadService is only functional on execute() and will otherwise throw
an UnsupportedOperationException.
| Modifier and Type | Method and Description |
|---|---|
Document |
downloadDocument(InputStream content,
Long folderId,
String filename)
Downloads data from provided stream and stores as a file.
|
Document downloadDocument(InputStream content, Long folderId, String filename) throws DocumentDownloadException
Downloaded files are not activated until your IntegrationTemplate
returns a successful IntegrationResponse. Any downloaded files not included in your IntegrationResponse
result map will be deleted.
A DocumentDownloadException thrown by this method does not need to be caught. By default,
these exceptions will be converted to IntegrationErrors.
content - The content of the document. If possible, pass your network stream directly into this method.folderId - The documents parentFolderId, retrieved from the designer through a
FolderPropertyDescriptor.filename - The downloaded document's name and extension.Document's InputStream.
Include the returned Document in your IntegrationResponse result map. If it is not included in the
result map, it will be deleted.DocumentDownloadExceptionCopyright © 2018-present Appian Corporation. All Rights Reserved.