Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is an extension to the information provided on ‘How How to setup a CMIS connection’connection.
The Studio model mentioned in the information below is based on the example project that has been provided in the connection setup section. References to Alfresco DMS docker environment do refer to the default Community Edition settings as starting point.

...

Table of Contents
minLevel2

Configure Alfresco

The default Alfresco model, type or its properties cannot be modified. Therefor you need to create a new ‘Content model’ in Alfresco.
Information about how to do so can be found on https://docs.alfresco.com/
Background on Models: https://docs.alfresco.com/content-services/latest/config/models/
Tutorial with example: https://docs.alfresco.com/content-services/latest/tutorial/model/

...

(note the automatic addition of the configured prefix of the Model (in this case ‘br’) to the name of the Type and the Property)

Configure Blueriq

The changes regarding Blueriq affect the Studio model and the Runtime properties.

Runtime

The provided properties for the application-cmis-client.properties need to be updated.
Specifically the blueriq.cmis.object-type-id property.
When using the default (out of the box) properties to store a file in Alfresco and retrieving its data the object-type-id is cmis:document.
But we want the use the new Custom Type which was created in the new Content Model in Alfresco.
So for the example we need to find the id for ‘br:Blueriq_Custom_Type’.
This involves using the Alfresco API and it is rather complicated.
It requires these steps:

    1. Go to http://localhost:8080/alfresco/
      -    Open ‘Alfresco WebDav’
      o    We don’t need the information there but accessing this page requires a login.
      This login provides the credentials in the session to be authorized for using the API as well. So login with admin, admin.

    2. Open the API link to the type descriptions in your browser.
      http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom/typedesc
      o    This is the link in the property blueriq.cmis.services-url, in the application-cmis-client.properties, + ‘/typedesc’
      o    It will display xml data
    3. Only if you want the data to be more easily readable, otherwise go to the next step.
      Copy the content to an editor (e.g. Notepad++) to format it to ‘pretty print’.
      Or any other option that suits you.

    4. We need the <cmis:id> for the created Custom Type with the name ‘br:Blueriq_Custom_Type
      A search for this name will find it is used in:
      <cmis:id>D:br:Blueriq_Custom_Type</cmis:id>

    5. Replace the blueriq.cmis.object-type-id cmis:document with the id of the new Custom Type and save the properties file.

      blueriq.cmis.object-type-id=cmis:document
      becomes
      blueriq.cmis.object-type-id=D:br:Blueriq_Custom_Type

    6. Restart the Blueriq Runtime Service

Studio model

In the Studio model changes need to be made to receive and work with the custom property within the profile. Basically, consisting of:
-    Add an attribute, for the property value.
-    Specify the new attribute as TargetAttribute for the DMS property value in service call with service type AQ_CMIS_GetDocumentMetadata.
-    Specify the new attribute as value for the DMS property field in service call with service type AQ_CMIS_Documentmanager (to set and update the value of the property)
-    Additional changes to pages, AQ_InstanceList, flow, to see and update the value.

...

-    DocumentManager_Update (service call)(service type AQ_CMIS_Documentmanager): 
To set/update the value of the custom property.
In section CUSTOM METADATA
Specify the custom property from the DMS to be mapped to the new attribute.

Result after

...

configuring

This is what it could look like:

...