Introduction

This How to article focuses on adding documents and its metadata to a case, the same way you can add an uploaded file to a case. When opening the case, you want to see all the files belonging to that case. For displaying the files an Container type: AQ_InstanceList container is used:

In this situation, a case is represented as an Aggregate, see Designing cases using aggregates

The instance list shows document instances that have been added at an earlier stage and persisted using aggregates. This article focuses on how Blueriq Documents are generated, stored in instances and supplemented with metadata so that you are able to display them in a list.

Example

In this example a Blueriq Document will be stored in a Document instance, which is related to a case. This ERD describes the relation:

First step is to create the file from the Document and store it on the filesystem, second step is to get all necessary metadata to display in the list. This results in this flow: 


The first servicecall is of type 'AQ_Document_Generate', the second of type 'Service call type: AQ_File_GetMetaData'.

AQ_Document_Generate

Service configuration

Shown below is the screen for the AQ_Document_Generate service.

Parameters

In Service call type: AQ_Document_Generate all parameters are discussed. In this article, the focus is on the following parameters:

Summary: a Document instance is created and added to the Case.Documents relation.


The Service call type: AQ_Document_Generate service doesn't retrieve the metadata - like filename and date created - from the file. To retrieve this information from the created file, the service Service call type: AQ_File_GetMetaData can be used.

AQ_File_GetMetadata

Service configuration

Shown below is the screen for the AQ_File_GetMetadata service.

Parameters

In Service call type: AQ_File_GetMetaData all parameters are discussed. In this example the following data is added as information to the Document instance, because this is the metadata set when generating the file: