Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

This content has been archived and is no longer being updated.

Links may not function; however, this content may be relevant to outdated versions of the product.

How to extend an Alfresco repository to include work object IDs

Updated on December 3, 2010

Summary

To add support for work object attachments stored in a CMIS-compliant Enterprise Content Management (ECM) repository, you must extend the ECM data model to include the types pxAttachKey and pxRefObjectKey. Adding these types allows the attachment metadata to contain information about the work object to which the file was attached.

In the example below, the data model of an Alfresco 3.4a Community Edition repository is extended to include support for the .pxAttachKey and .pxRefObjectKey properties. For instructions on extending other ECM repositories, refer to your ECM vendor's documentation.

 

Suggested Approach

To extend the Alfresco data model:

  • Define the custom content in an XML document
  • Create an additional XML document to call the newly created content
  • Place the files in the appropriate Alfresco directory

Define the custom content to be added

    1. Create an XML document which follows the schema described in modelSchema.xsd (located in the <Alfresco_Home>\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\model directory). In this example, the file is called pega-model.xml.

    2. Add the following XML. This XML defines a workObjectAttachment type and contains the properties .pxAttachKey and .pxRefObjectKey.

<type name="pega:workObjectAttachment">
<title>work object attachment</title>
<parent>cm:content</parent>
<properties>
<property name="pega:pxAttachKey">
<type>d:text</type>
<mandatory>true</mandatory>
</property>      
<property name="pega:pxRefObjectKey">
<type>d:text</type>
<mandatory>true</mandatory>
</property>      
</properties>
</type>

Create a calling file

    1. Create an XML file with a name ending in context. For example pega-model-context.xml.

    2. In this file, paste the following text:
<!--  Registration of new models -->
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap"
depends-on="dictionaryBootstrap">      <property name="models">
<list>
<value>alfresco/extension/pega-model.xml</value>
</list>
</property>
</bean>

Note: The value for the location of the pega-model.xml file must be copied exactly as given.

Place the files in the appropriate Alfresco directory

The two XML files must be placed in the <Alfresco_Home>\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension directory. Restart Alfresco to apply the changes.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us