Page History
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 IBM Filenet and Alfresco.
Info |
---|
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. |
Step-by-step guide
To use a CMIS connection follow these steps:
...
Prepare required elements
The folowing component needs to be configured in Blueriq Runtime:
- CMIS Client component
The following CMIS components are needed in Blueriq Studio :
...
(provided by AquimaLibraries package):
- AQ_CMIS_Documentmanager (service)
- AQ_CMIS_GetDocumentMetadata (service)
- AQ_CMIS_DownloadDocument (container)AQ_Document_Renderer (service)
...
Runtime
...
- CMIS plugin
- WebFileUpload plugin
Runtime Configuration for CMIS
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# 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
Info |
---|
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 plugin Client component by adding the cmis-client
profile to the spring.profiles.active setting property in de 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
Model
Download the CMIS Example 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 _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.
...
A domain model suitable to handle documents
At first the user For CMIS connections you should make it possible that your domain can handle documents. Therefore you 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 a an entity to store the file name and file path that you need for the AQ_File_WebFileUpload Upload container.
Note : when creating attributes, make sure they have the same properties as defined in the DMS!
The Document document meta data entity consist of some of some basic document attributes:
- FileName
- Unique ID
- CreatedBy
- Creation date
- Modfied by
- Last modified on
- Version
You can also define some custom properties, for example case information. Please remind that you will need to define the document property with the document type as configured in Alfresco (in this example br: )All this is provided in the example project.
Uploading a file to the profile session
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 have to create will find a flow with a page on it, this page contains the AQ_File_WebFileUpload Upload container.
The WebFileUpload container contains two parameters, the file name attribute where the document path will be stored and a text item, where you can define the test to show on your screen after a successful upload to session.
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.
Document manager
For the second step of storing the document into the DMS, you need to model the document manager service .
Create There is a Documentmanager_Save service with the AQ_CMIS_DocumentManager and define the following parameters:
- Action : Store
- FileId: this is the attribute reference to the instance that is created by the AQ_File_Upload container that is used to get a file on your session
- Connection: this is the connection reference that is also used by the AQ_File_Upload container that is used to get a file on your session
- Document Name or Id is mandatory
- The document path, this this is the path in path in your DMS where DMS where the document should be placed.
This document path in In this example the path is placed on the screen so it can be manually defined. In practice it's wise to derive the document path by a decision table.The Remove from scope means that after a successful upload of the document to the DMS the document, the document will be removed from the session so a new document can be placed.
The document manager is also used when you want to update or delete or update a document.
In this case create 2 servicetwo services are made:
- DocumentManager_Update service for updating the DMS
Using using parameter action Save - DocumentManager_Delete service for deleting the document from the DMS
Using , using the parameter action Delete, when selecting the option Delete all, all versions of the document will be removed from the DMS.
Get Document (Meta) Data
After uploading a document, you can use the GetDocumentMetaData service, to receive the data of the uploaded documents from the DMS.Create a service with the AQ_CMIS_GetDocumentMetaData and fill in at least all the basic document properties (and custom properties if needed) as described in 3.1. Don't forget the document type in case of using custom properties.
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.
Generating a Blueriq Document and store it to session
Instead of selecting a document from a directory on you hard drive, it is also possible to generate a Blueriq Document with the AQ_DocumentRenderer service and place this document as PDF on your profile session.
The following two parameters are required to create :
- Document name you have to define the name of the Blueriq document that you would like to generate (between " ")
Document type, the only supported type is PDF
The generated PDF document can be saved to the DMS with the DocumentManager_Save service. Please make sure that the required document file name and the document path name is derived!
View runtime
Compatibilty
For using the CMIS connection we recommend the user to use Google Chrome or Firefox to Runtime. If you insist to use Internet Explorer please read the following compatibility:
Browser | Browser settings | Runtime dashboard settings |
---|---|---|
IE 10+ | Compatibility view off, document mode standards (when you use the toolbar as developer, the browser setting will be default IE9). | only MVC |
<= IE 9 | - | only XSLT |
Start application
Start the application by selecting the CMIS project with the following settings:
Follow the instructions on the screen to upload, update or delete a document. You can also generate a PDF and upload this to the DMS.
View runtime
Start application
Follow the instructions on the screen to upload, update or delete a document.
Info |
---|
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 Download an example project here.
UI Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
...