Introduction

A connection is a mechanism to store files.

Each connection consists of three parts:

  1. Name
  2. Type
  3. Path (optional)

and the schema is:

blueriq.connection.<name>.<type>[.path = <path>]

1) Name

As a name you can enter whathever you like as name. The name of a connection is handled as a string.

2) Type

The type defines on which system the file is stored. The following systems are possible:

  1. Memory
  2. File system
1) Memory

The value is memory. In case of a memory connection an example of the schema is:

blueriq.connection.system1.memory

2) File system

The value is filesystem. In case of a file system connection an example of the schema is:

blueriq.connection.system2.filesystem.path=<path>

3) Path (optional)

In case the type is a filesystem, also the path of the root folder must be specified, e.g.:

C:/Blueriq/Uploads

(warning) Note to use forward slashes '/' in the path; backward slashes as used in Windows will not work.

An example of the complete file system connection is:

blueriq.connection.filesystemconnection.filesystem.path=C:/Blueriq/Uploads

It is also possible to use a relative path. In that case relative paths start in directory jboss/bin, so please use this as the starting point.

As soon as the first document is stored via the runtime, inside the root folder two sub folders are created:

  1. DATA
  2. METADATA
1) DATA

In this folder the real file is stored. Each file gets its id as file name, without extension. An example is:

0d80ebe2-73b2-482b-ae64-53ffe7d923fb

2) METADATA

For each file stored in DATA there is a metadata file. This file also gets the id as file name and is stored in xml format. An example is:

0d80ebe2-73b2-482b-ae64-53ffe7d923fb.xml

In this metadata file the following information is kept:

NameDescriptionExample
IDThe Id of the file.0d80ebe2-73b2-482b-ae64-53ffe7d923fb
NameThe file name as it is shown in the application (at runtime).Test_Application.pdf
ContentTypeThe type of the file.

application/pdf, image/jpeg

CreationDateThe date when this file was stored.2015-06-18T11:52:08
CreatedByUserIdThe user who stored the file.anonymousUser
CASE_IDThe corresponding case id.

A metadata file is illustrated by the following example.

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
    <properties>
        <property>
            <name>ID</name>
            <value>0d80ebe2-73b2-482b-ae64-53ffe7d923fb</value>
        </property>
        <property>
            <name>Name</name>
            <value>Test_Application.pdf</value>
        </property>
        <property>
            <name>ContentType</name>
            <value>pdf</value>
        </property>
        <property>
            <name>CreationDate</name>
            <value>2015-06-18T11:52:08</value>
        </property>
        <property>
            <name>CreatedByUserId</name>
            <value>anonymousUser</value>
        </property>
        <property>
            <name>CASE_ID</name>
            <value/>
        </property>
    </properties>
    <custom>
        <properties/>
    </custom>
</metadata>

Step-by-step guide

In order to use a connection please take the following steps:

  1. Open the runtime properties file (application.properties).
  2. Enter somewhere a line with the connection including the values in the schema blueriq.connection.<name>.<type>[.path = <path>].
  3. Save the file.
  4. Click on 'Reload Configuration' on the runtime dashboard.
  5. Runtime is now configured.
  6. Enter the connection name in your service or container (identified by the name connection as parameter).
  7. You are ready to use the connection.