Skip to main content

Configuration to access a DMS

CMDBuild supports integration with Document Management Systems (DMS) via the CMIS protocol, enabling the following base features:

  • Attach any kind of file to any data card
  • Assign a category to each attached file
  • Display and browse uploaded files

Category and metadata management relies on a DMS exposed through standard APIs.

Configuration of categories management

This section describes how to configure a DMS to manage attachment classification on CMDBuild cards.

The following example refers to Alfresco 25.3.0. The names used are provided as examples and are not binding.

To define custom categories, create the two files below and place them in:

${ALFRESCO_HOME}/tomcat/shared/classes/alfresco/extension

1. cmdbuild-model-context.xml

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN'
'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

<!-- Registration of new models -->

<bean id="example.dictionaryBootstrap"
parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/cmdbuild-model.xml</value>
</list>
</property>
</bean>

</beans>

2. cmdbuild-model.xml

<?xml version="1.0" encoding="UTF-8"?>

<!-- Definition of new Model -->

<model name="cmdbuild:module"
xmlns="http://www.alfresco.org/model/dictionary/1.0">

<description>Custom Model for CMDBuild</description>
<author>CMDBuild Team</author>
<version>1.0</version>

<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>

<namespaces>
<namespace uri="org.cmdbuild.dms.alfresco" prefix="cmdbuild"/>
</namespaces>

<aspects>
<aspect name="cmdbuild:classifiable">
<title>Classification</title>
<properties>
<property name="cmdbuild:classification">
<type>d:text</type>
</property>
</properties>
</aspect>
</aspects>

</model>

Configuration of the DMS in CMDBuild

DMS settings can be managed via REST commands. Use editconfig to open a GUI showing all available configurations (when CMDBuild is running locally), or use setconfig / setconfigs to apply settings directly from the command line. Example:

cmdbuild.sh restws setconfig org.cmdbuild.dms.enabled true

General configuration

ConfigTypeDescription
org.cmdbuild.dms.enabledBooleanEnables or disables the DMS service
org.cmdbuild.dms.service.typeStringDMS service type: alfresco (external DMS), postgres (embedded DMS using the CMDBuild PostgreSQL database), or sharepoint_online
org.cmdbuild.dms.category.lookupStringSets the base lookup DMS category
org.cmdbuild.dms.regularAttachments.maxFileSizeIntMaximum allowed file size, in MB
org.cmdbuild.dms.incomingEmailAttachments.allowedFileExtensionsList<String>Allowed file extensions (lowercase) for incoming email attachments; rejected attachments are ignored with a warning, without affecting email processing
org.cmdbuild.dms.autolink.pathStringAutolink base path (overrides the DMS provider base path for links)
org.cmdbuild.dms.autolink.scriptStringAutolink helper script

Alfresco configuration

ConfigTypeDescription
org.cmdbuild.dms.service.alfresco.userStringService username
org.cmdbuild.dms.service.alfresco.passwordStringService password
org.cmdbuild.dms.service.alfresco.pathStringService path
org.cmdbuild.dms.service.alfresco.apiBaseUrlStringService URL

SharePoint configuration

ConfigTypeDescription
org.cmdbuild.dms.service.sharepoint.userStringService username
org.cmdbuild.dms.service.sharepoint.passwordStringService password
org.cmdbuild.dms.service.sharepoint.urlStringService URL
org.cmdbuild.dms.service.sharepoint.pathStringService path
org.cmdbuild.dms.service.sharepoint.graphApi.urlStringGraph API service URL
org.cmdbuild.dms.service.sharepoint.auth.serviceUrlStringAuthentication service URL
org.cmdbuild.dms.service.sharepoint.auth.clientIdStringAuthentication client ID
org.cmdbuild.dms.service.sharepoint.auth.clientSecretStringAuthentication client secret
org.cmdbuild.dms.service.sharepoint.auth.protocolStringAuthentication protocol
org.cmdbuild.dms.service.sharepoint.auth.resourceIdStringAuthentication resource ID
org.cmdbuild.dms.service.sharepoint.auth.tenantIdStringAuthentication tenant ID
org.cmdbuild.dms.service.sharepoint.model.authorColumnStringAuthor mapping column
org.cmdbuild.dms.service.sharepoint.model.categoryColumnStringCategory mapping column
org.cmdbuild.dms.service.sharepoint.model.descriptionColumnStringDescription mapping column