Below you will find a description how to model a CMIS connection in your Blueriq application. With this connection it will be possible to upload documents to your Blueriq session, upload documents to a Document Management System and manage the data of these documents within your application. At this moment our integration tests run against Alfresco.
Tip: Alfresco provides an easy to use Docker compose file against which you can (locally) test a Blueriq CMIS connection. This Alfresco DMS environment is used to create the Blueriq CMIS example project. |
To use a CMIS connection follow these steps:
The folowing component needs to be configured in Blueriq Runtime:
The following CMIS components are needed in Blueriq Studio (provided by AquimaLibraries package):
Add these properties to the application-cmis-client.properties
(you can create this file separately when you add the profile to the bootstrap properties):
# CMIS
blueriq.cmis.services-url=[host]
blueriq.cmis.user=[username]
blueriq.cmis.password=[password]
blueriq.cmis.repository-id=-default-
blueriq.cmis.object-type-id=cmis:document
blueriq.cmis.binding-type=atompub
When you use the earlier referred Alfresco DMS docker environment the properties would be:
|
Add this property to the application.properties
:
# Connections
blueriq.connection.memoryconnection.memory
Also enable the CMIS Client component by adding the cmis-client
profile to the spring.profiles.active property in the bootstrap.properties
. For example:
spring.profiles.active=native,development-tools,dashboard,externaldatasources,customerdata-sql-store,trace-sql-store,process-sql-store,reporting-sql-store,comments-sql-store,cmis-client
Make sure to restart the Runtime server (Reload Settings will not work).
More information on how to configure the application using Spring Profiles can be found here : Application configuration with Spring Profiles
Download the R13 and R14 package and extract the files to Blueriq\Studio\Configuration\Libraries (make sure you have the latest update of Blueriq).
Now create a new project with the project name CMIS_Example and use the CMIS example package as input.
The studio model will automatically start and you can see how you can set up the CMIS connection.
For CMIS connections you should make it possible that your domain can handle documents. Therefore you need to create a document entity where you can store the meta data of the document data that you will get back from the DMS. It's also recommended to have an entity to store the file name and file path that you need for the AQ_File_Upload container.
Note : when creating attributes, make sure they have the same properties as defined in the DMS!
The document meta data entity consist of some basic document attributes:
All this is provided in the example project.
Uploading a document with the CMIS connection consist out of 2 steps, the first step is storing the document to the profile session and the second step is actually storing (sending) the document into the DMS.
For the first step you will find a flow with a page on it, this page contains the AQ_File_Upload container.
Keep in mind that document store function only supports one document on the session at a time. Therefore the AQ_File_Upload container is set to single file mode in the parameters.
For the second step of storing the document into the DMS, you need to model the document manager service .
There is a Documentmanager_Save service with the AQ_CMIS_DocumentManager and define the following parameters:
The document manager is also used when you want to update or delete a document.
In this case two services are made:
After uploading a document, you can use the GetDocumentMetaData service, to receive the data of the uploaded documents from the DMS.
After downloading the Document (meta) data, you can show the downloaded document on your screen with the AQ_CMIS_DownloadDocument container, this will create a download link on your screen. This download link is a text item which the user can define.
Follow the instructions on the screen to upload, update or delete a document.
When you use the earlier referred Alfresco DMS docker environment you can view the files in the DMS: The default Alfresco web port is 8080. |
Download the example project for Blueriq 13 or 14 here.