Alfresco Records Management Custom Metadata

Adding custom metadata to a record can seem like a daunting task, but once you have a good grasp on some RM basics, it’s easily achievable. This tutorial is going to focus on adding custom record data to the dod5015 records management site. This was tested with Alfresco Records Management version 2.2.

Here is an outline of the steps we’ll be taking to make this happen:
1. Create a model
2. Load model
3. Share Configuration
4. Test

Create a Model

Let’s start by creating a model to house our metadata. The properties will be added to an aspect. By using a parent designation we can associate the aspect with Records Management allowing us to add the metadata to content we’re managing in our RM site while maintaining the policies of good record keeping.


<?xml version="1.0" encoding="UTF-8"?>
<model name="fika:model" xmlns="">
	<description>Tutorial Model</description>
	<author>Stan Arnold</author>
	<!-- Imports are required to allow references to definitions in other models -->
		<!-- Import Alfresco Dictionary Definitions -->
		<import prefix="d" uri=""/>
		<!-- Import Alfresco Content Domain Model Definitions -->
		<import prefix="cm" uri=""/>
		<!-- Import Alfresco Content Domain Model Definitions -->
		<import prefix="sys" uri=""/>
		<!-- Import Alfresco Records Management Model Definitions -->
		<import prefix="rma" uri=""/>
	<!-- Introduction of new namespaces defined by this model -->
		<namespace prefix="fika" uri=""/>
		<!-- New Record Metadata Set -->
		<aspect name="fika:recordData">
			<title>Fika Record Data</title>
			<!-- Required -->
				<property name="fika:recordSource">
					<title>Record Source</title>
					<index enabled="true">
				<property name="fika:recordContributor">
					<title>Record Contributor</title>
					<index enabled="true">
			<!-- Required -->


If you’ve created a custom model in Alfresco before most of this probably looks familiar. Here are the key differences to look for:

We are importing the rma namespace for records management dependencies.

		<!-- Import Alfresco Records Management Model Definitions -->
		<import prefix="rma" uri=""/>

The new aspect has an rma parent type.

			<!-- Required -->

We’ve added a mandatory aspect for file plan components.

			<!-- Required -->


Load model

Whether you are creating a model specifically for RM or just adding new metadata to Alfresco you will need to create a bean to load your model. This is done by created a ‘-context.xml’ file with a bean definition. We can use this file to load our metadata into the dod file plan as well.


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans
	<!--Registration of new models -->
	<bean depends-on="dictionaryBootstrap" id="fika.dictionaryBootstrap" parent="dictionaryModelBootstrap">
		<property name="models">
	<!-- Add metadata to DOD5015 RM site -->
	<bean id="fika.recordMetadataAspectBootstrap" parent="recordMetadataAspectBootstrap">
		<property name="recordMetadataAspects">
				<entry key="fika:recordData" value="dod:filePlan"/>

Note <entry key=”fika:recordData” value=”dod:filePlan”/> is used to add our aspect to the dod file plan.

Share Configuration

In order to view our new changes we will need to add the fika:recordData aspect to our share configuration so that Share will know to render the aspect and its metadata fields.

First we add the aspect.

 <!--Add our aspect -->
 <aspect name="fika:recordData"/>

Now we set up the fields.

<!-- Fika Aspect fields -->
      <config condition="fika:recordData" evaluator="aspect">
                  <show id="fika:recordSource" set="rm-metadata-fika-recordData"/>
                  <show id="fika:recordContributor" set="rm-metadata-fika-recordData"/>
                  <set appearance="panel" id="rm-metadata-fika-recordData"/>
                  <field id="fika:recordSource" set="rm-metadata-fika-recordData"/>
                  <field id="fika:recordContributor" set="rm-metadata-fika-recordData"/>

This is all done in alfresco/web-extension/share-config-custom.xml 

Once we have our aspect configured we can add a label for our new set by bootstrapping a properties file in the share war. Normally I would add the label to the share-config for the sake of brevity (and because I don’t expect the need for multi-language support), however using the ‘label=<>’ method did not seem to work for me. So here is how I managed to get my set labeled.


<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' ''>

    <!-- Add Fika messages -->
    <bean id="fika_resources" class="">
        <property name="resourceBundles">


Set the label in a properties file.


label.set.rm-metadata-fika-recordData=Fika Record Metadata



We are now ready to test our new changes. Remember we added these changes to the DOD5015 site so be sure to create that specific site sub-type when creating a Records Management site.

Screen Shot 2015-04-08 at 4.18.47 PM

Add content to the file plan then run the ‘Add Record Metadata’ action.

Screen Shot 2015-04-08 at 4.21.07 PM

You should now see your custom data available.

Screen Shot 2015-04-09 at 8.48.40 AM

Files from this tutorial are available for download below. Please leave your feedback, questions, or issues in the comments below. Happy extending!



  1. Benson says

    I would like to know what versions of Alfresco and rm you have used. I have tried to replicate your instructions on Alfresco 5.0.d and with both RM alfresco-rm-2.0.1-147 and alfresco-rm-share-2.3.c and failed spectacularly. I have also downgraded to use Alfresco 4.2 with similar problems. Specifically, Alfresco refuses to create the RM sites and in one scenario alfresco breaks down completely and is inaccessible. Specifically what versions of RM and Alfresco should i try. Thanks

    • Stan says

      This was done on Alfresco 5.0.1 using Records Management 2.3. You’ll want to check the supported version for your community version on the wiki. Without further information (logging, steps to reproduce) I’m not sure I can be of much help. If you can’t create the RM site it’s possible the amp was not properly installed.

  2. F says

    Hi, Tanks for this article. But i can’t download the example files, the link is broken. Can you fix it?

Leave a Reply

Your email address will not be published. Required fields are marked *

From our Blog...

Managing Digital Risk

Leveraging Content Management Systems to Mitigate Digital Risk The convenience of the digital world is not freely given. It is hard to imagine a world where you can’t think of an item and purchase it online within a few minutes. As we bask in the glow of endless catalogs of online goods, the thought of online… Read more »

Read More

Configuring Alfresco SAML SSO Module with Okta IdP

Alfresco recently released a new patch for their SAML Single Sign On solution module. This module allows Alfresco user’s to configure their Alfresco installation with their Single Sign On (SSO) Identity Provider. In this tutorial, I’ll explain the process of configuring Okta to be used with the module. Note: This tutorial is assuming you’ve followed… Read more »

Read More

Content Migration: Being Prepared

Much like negotiating a treaty between two countries who do not share a common language, someone will be faced with the task of translating. If that translator is not properly prepared the outcome might create more problems than it solves.

Read More