Configuration to support customer properties metadata
Once the CMIS configuration is in place, every document uploaded for work is uploaded to the CMIS system. The uploaded document includes the basic details of the document, such as content type, size, and name, as well as metadata. A document with just basic details would suffice if the document were for backend verification only. However, if the document is required for verification in the UI or can be reused later, then the basic details would not serve the purpose. Also, if no additional metadata is specified, a search on the instance would return all the documents uploaded to the server, which may not be the expected behavior.
The addition of metadata while uploading a document helps differentiate it from other documents based on the metadata configured. This also helps in searching for specific documents rather than querying the whole list.
For the current implementation, Document Type and Customer ID have been added as the custom metadata properties in addition to some Pega-provided properties. With the addition of these properties, you need to configure the CMIS server.
The sample configuration for Alfresco is as follows:
Create an XML file in the following location: <Alfresco installed drive>\Alfresco\tomcat\shared\classes\alfresco\extension.
Use the name pega-model.xml with the following XML:
You can copy the XML documents provided in this section.
The pega:workObjectAttachment is the type of object uploaded in our application that will be stored in CMIS. The pega:pxAttachKey, pega:pxRefObjectKey, pega:DocumentType, and pega:CustomerID are the properties that are uploaded to the CMIS while uploading the document. These properties can be further used to query the CMIS to search for the uploaded documents.
Using the XML below, create an XML file that references the pega-model.xml in the
following directory: <Alfresco installed
drive>\Alfresco\tomcat\shared\classes\alfresco\extension
The name should contain “-context” because the application configuration checks for any additional configuration in the “*-context.xml” files. As a result, the configuration described above is picked up from this file.
If the web-client-config-custom.xml file does not exist in the following folder, create it in the following directory, and then update it with the XML shown in the subsequent figure:
<Alfresco installed drive>\Alfresco\tomcat\shared\classes\alfresco\extension
The configuration above is specific to Alfresco. If you specify a different CMIS server, then the directories and configuration may change based on the configuration of the server.
Also, you might need to change the names for different CMIS servers. In addition to configuring the files as specified, you need to restart the CMIS server for the changes to take effect. Also, you need to save the Application rule form after you restart the CMIS server.
Previous topic Attachments using CMIS Next topic Technical details for the manage requirement documents screen