How to Integrate Alfresco With Ephesoft
Check out this great guide to integrating Alfresco and Ephesoft, which can truly help with document and content management.
Join the DZone community and get the full member experience.
Join For FreeDocuments are the foundation of any organization these days. None of us are oblivious to the importance of documents anymore nor to the challenges faced while handling such surge of documents and data. Organizations dealing with big amounts of data in documents are well versed with two software; Ephesoft which is used for document scanning and parsing, and Alfresco for storing and managing the data. Do these two make a great combination, and how do we go about their integration, if at all? Let’s find out.
Steps to Integrate Alfresco With Ephesoft:
The Content Management Interoperability Services (CMIS) plugin caters to the need of pulling and pushing CMIS compatible documents from repositories like Alfresco, Sharepoint, Nuxeo, etc. So the initiation of Ephesoft and Alfresco integration is done by configuring the CMIS plugin in Ephesoft.
#1 Prepare Ephesoft by Mapping attributes: DLF-Attribute-mapping.properties file needs to be configured in the first step of integration initiation. The DLF-Attribute-mapping.properties file is found at the following location -
[EphesoftInstallationDirectory]\SharedFolders\[Batch-class-Folder]\cmis-plugin-mapping\DLF-Attribute-mapping.properties
The mapping format is given below:
DocumentTypeName=DocumentumTypeName
DocumentTypeName.FieldTypeName1=Documentum’sType’sAttributeName1
DocumentTypeName.FieldTypeName2=Documentum’sType’sAttributeName2
DocumentTypeName.FieldTypeName3=Documentum’sType’sAttributeName3
For example if you are mapping invoice data it would be something like this
Invoice-Data=D:ephesoft:document
Invoice-Data.PartNumber=ephesoft:partNumber
Invoice-Data.InvoiceTotal=ephesoft:invoiceTotal
Invoice-Data.InvoiceTotal=ephesoft:invoiceDate
Invoice-Data.State=ephesoft:state
Invoice-Data.City=ephesoft:city
#2 Preparing Alfresco for Ephesoft: After mapping the attributes in Ephesoft, we need to prepare Alfresco for Ephesoft and save three configuration files in the Alfresco extension directory located at -
< Alfresco installation path>\tomcat\shared\classes\alfresco\extension
The files are enlisted below:
→ ephesoftModel.xml
→ ephesoft-model-context.xml
→ web-client-config-custom.xml (used to configure alfresco web client)
ephesoftModel.xml:
It is the configuration file which contains the parameter mapping. It looks something as follows:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<!-- The important part here is the name - Note: the use of the my: namespace
which is defined further on in the document -->
<model name="ephesoft:custommodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Example ephesoft custom Model</description>
<author></author>
<version>1.0</version>
<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<!-- Introduction of new namespaces defined by this model -->
<!-- NOTE: The following namespace my.new.model should be changed to reflect your own namespace -->
<namespaces>
<namespace uri="custom.model" prefix="ephesoft"/>
</namespaces>
<types>
<!-- Definition of new Content Type: Standard Operating Procedure -->
<type name="ephesoft:ephesoft">
<title>ephesoft Document Procedure</title>
<parent>cm:content</parent>
<properties>
<property name="ephesoft:invoiceDate">
<type>d:text</type>
</property>
<property name="ephesoft:partNumber">
<type>d:text</type>
</property>
<property name="ephesoft:invoiceTotal">
<type>d:text</type>
</property>
<property name="ephesoft:state">
<type>d:text</type>
</property>
<property name="ephesoft:city">
<type>d:text</type>
</property>
</properties>
</type>
</types>
<aspects>
<!-- Definition of new Content Aspect: Image Classification -->
<aspect name="ephesoft:documentClassification">
<title>ephesoft Document Classfication</title>
<properties>
<property name="ephesoft:size">
<type>d:int</type>
</property>
<property name="ephesoft:type">
<type>d:text</type>
</property>
</properties>
</aspect>
</aspects>
</model>
ephesoft-model-context.xml: This file is used to define any custom configuration between Alfresco and Ephesoft. The ephesoft-model-context.xml, the main file that tells Alfresco to look for ephesoftModel.xml file. It looks like the following:
<?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="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap"
depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/ephesoftModel.xml</value>
</list>
</property>
</bean>
</beans>
To check the correctness of the configuration we may follow the steps given below:
http:///alfresco/service/cmis, -> Types Collection -> Down which will list all the objects inherited from CMIS document. Once you locate the D:Ephesoft document, then selecting this would display a list of properties, on correct configuration.
ephesoft:invoiceTotal
id ephesoft:invoiceTotal
localName invoiceTotal
localNamespace http://com.ephesoft.demo/model/content/1.0
displayName Invoice Total
queryName ephesoft:invoiceTotal
propertyType decimal
cardinality single
updatability readwrite
inherited false
required false
queryable true
orderable true
openChoice false
ephesoft:invoiceDate
id ephesoft:invoiceDate
localName invoiceDate
localNamespace http://com.ephesoft.demo/model/content/1.0
displayName Invoice Date
queryName ephesoft:invoiceDate
propertyType datetime
cardinality single
updatability readwrite
inherited false
required false
queryable true
orderable true
openChoice false
#3 Configuring Ephesoft CMIS Plugin: You can export the batch. By going to http://localhost:8080/dcma/BatchClassManagement.html navigate to document batches in Ephesoft.
Select the appropriate batch you need to export and click on export from the opened list of actions.
A new screen pops open.
After filling the necessary information in the configuration file, click save.
On an ending note type mismatch is the most common challenge faced during the integration process. So it's preferable to make use of String type in Ephesoft to avoid complications. And there you go, it ensures flawless integration of Alfresco and Ephesoft.
Opinions expressed by DZone contributors are their own.
Comments