You are viewing the documentation for Blueriq 16. Documentation for other versions is available in our documentation directory.
This service generates a file from a document (or page).
Introduction
To generate a file the document or page which is modeled in Encore has to be specified. The service will return the file id and put it in the attribute specified in 'FileId'. Also the type and the file name must be specified. Currently only PDF documents can be generated. To be able to store the generated file somewhere, the connection has to be stated. With the parameter 'Persistence' a modeler can specify whether the file should be generated and stored permanently or temporary. For the latter case the file will be removed from the connection when the session/request is expired. By setting the 'CreateInstance' and 'Relation' it is possible to state whether an instance should be created automatically and whether it has to be added to a relation. The last parameter (UpdateFileId) could be useful in case of overwriting an existing file, for example if you only want to have only one kind of file.
Comparable components
This service has the following comparable components:
In contrast to the AQ_Document_Renderer this service uses a connection to store the file on, which is more flexible. The AQ_DocumentLink can only be used when this container is shown on a page.
Parameters
Name | Description | Direction | Type | Required | Example |
---|---|---|---|---|---|
Document | The name of the document as it is stored in Encore. | Input | Document | No1 | Application |
Page | The name of the page as it is stored in Encore. | Input | Page | No1 | - |
FileName | The schema to generate a file name. | Input | Expression | Yes | "Application " + TODAY + ".pdf" |
FileType | The file type that is to be generated. | Input | String | Yes | pdf (specify without quotes) |
Connection | The connection2 on which the generated file should be stored. | Input | String | Yes | onfilesystem |
Persistence | Store a generated document temporary or permanently. | Input | Domain | Yes | Permanent |
CreateInstance | Create a new instance. | Input | Boolean | Yes | Yes |
Relation | The newly created instance will be linked to the given relation. | Input | Relation | No | Applications.RelApplication |
UpdateFileID | The file id that should be overwritten. | Input | Attribute | No | - |
FileID | The attribute that contains the file id. | Output | Attribute | Yes | Document.Id |
AuthorizedRoles | Select roles that are authorized for this document | Input | Role(s) | No | Junior, Senior |
CaseId | The id of the case where the document is generated for3 When using the Process-Engine the value of this field is set as process_id in the metadata When using the Case-Engine, this field must be omitted. It will automatically be filled with the caseId during task execution. | Input | Expression | No | Control.CaseId |
The Unauthorized
exit is triggered when updating a file for which the user does not have one of the required roles.
1) One of them is necessary otherwise there is nothing to generate.
2) See How to setup a connection.
3) The CaseId is used to add to the Trace Engine and to create an event on the case's timeline. It was added in Blueriq 12.12.
Note on persistence
Connection Type Persistence Clustered Notes Memory Temporary No The file is stored temporarily for the duration of the current request. At the end of the request the file is deleted. Memory connections and temporary persistence should be used when an uploaded/received file is immediately sent to a 3rd party system during the same request. Memory Temporary Yes Memory Permanent No Permanently storing files in a memory connections is not allowed. The Runtime will throw an exception when trying to permanently store files in a memory connection Memory Permanent Yes Other / FileSystem Temporary No The file is stored temporarily for the duration of the current session. At the end of the session the file is deleted. Other / FileSystem Temporary Yes The file is stored temporarily for the duration of the current session and a Quartz job is scheduled to delete the file. Other / FileSystem Permanent No The file is permanently stored in the connection and must be explicitly deleted when no longer needed. Other / FileSystem Permanent Yes