Content Model Manager (CMM) Workshop
Multi-media Resource Library
We have put together a number of multi-media resources to help you during today's Content Model Manager workshop:
Lesson 1- Introduction to CMM
Lesson 2 - Basic Content Models
Creating a basic Model
- Managing Content Models
Lesson 3 - Building Content Models
- Form Layout Designer
Lesson 1 - Introduction to CMM
Traditional Content Model Construction with XML
1. Traditionally in Alfresco, a content model is defined in multiple XML documents.
- allows us to describe the structure of content in an ECM repository as well as any associations between individual pieces of content.
2. The required components of an XML content model include:
- data type, content type, properties, aspects, constraints and optionally associations.
Each of these components essentially uses and represents ''Metadata', or “data about data.” Metadata defines all of the relationships and structure for your ECM content in the repository.
Issues using XML
1. Content models in XML are very technical in nature, and should not be attempted unless you have an advanced skill set with Alfresco, because there can be very nuanced and subtle deployment considerations.
2. It’s important to get each component of an XML content model correct, because there are several risks involved if you don’t....
- you can “break” your server rendering it unable to start up.
- inappropriate configuration leads to deployment that is error prone.
1. Dynamic models allow developers to define models using XML
- dynamically upload the model into the content repository and have it read, without needing to upload and restart the server.
Put simply, dynamic models allow you to use content models “on the fly” in the repository.
2. XML poses some special difficulties:
- XML content models only address how the model is built structurally, but doesn’t address how the model is “shown” to the end-user.
- does not allow developers to control the presentation of your forms or content.
- developers still need to deploy their models manually, complete server restarts and a host of other administrative duties.
Content Model Manager
1. Model Manager is a User Interface (UI) that allows anyone with the proper privileges to build a content model without being familiar with XML.
2. The Model Manager is designed to hide technical details.
- prevents many of the XML-based and IT-related issues with the traditional method of creating content models in Alfresco.
- allows end-users to define and edit types, properties and aspects, and to capture the associated metadata.
The Model Manager does the heavy lifting of constructing the content model which leaves additional time for design and also ensures the safety of the repository through validation.
Modelling Methods: XML vs. User Interface
1. While XML-based content model development has many advantages, it has to be completed and deployed by highly technical developers and administrators.
2. Alfresco Share 5.1 Model Manager reduces the weaknesses of an XML format
- allows Business Analysts and end-users to define and edit content models in real-time using the new User Interface.
- this will allow greater modelling capabilities in future Alfresco ECM releases and become more intuitive, allowing more job roles to create models.
Lesson 2 - Basic Content Models
Exercise 1 - Creating a basic Model
The following multi-media presentations will quickly introduce you to the key processes for creating and applying a simple customised Content model.
You should view the presentations and complete the mind map on your VMware environment.
The presentations will show you how to create a simple Custom Type and a generic Aspect, place them on a form layout and apply them to a document. The forms can then be used to capture additional metadata about a document.
1. Creating a basic Model
This first presentation show you how to start to create a Content Model, Custom Types, Aspects and the Forms for the displaying the information in Share:
- Custom Type called 'whitePaper" with 2 x properties:
- Writer - text field Domain - list of departments
- Aspect called 'webable' with 2 x properties:
- isActive - tick box Published - date/time
2. Applying the Model in Share
This presentation show you how to select the Custom Type and attach an Aspect, then use the forms to add additional metadata information.
Exercise 2 - Managing Content Models
Managing Content Models
In this section we show you how you can easily manage the content models you create in CMM.
When working with CMM, you will need to be able to:
For your convenience, we have included a mind map that summarises the information from the videos.
Please review the following 3 short videos and check the details on your mind map.
Exercise 2 - Export and Import a Content Model
Exporting a Content Model Demonstration
Importing a Content Model Demonstration
Exercise 2 - Deactivating and Deleting a Content Model
Lesson 3 - Building Content Models
What is a Type?
A Type models an object in the content management solution that your are implementing for a specific domain. For example, a project, marketing document, engineering drawing, software manual, legal case, book, chapter, etc.
A Custom Type helps define:
- the data as elements or objects.
- the object attributes (metadata or 'data about data')
The key to creating a Type is to be able to identify similar attributes within the content. Once those attributes are identified, the Type will help to provide the structure to model the content that share those attributes.
A model can have one or more Custom Types.
An object in the repository, such as a file or a folder, can only be assigned as one Type.
What are Aspects and why are they used?
Custom Type v Aspect
- As we know a Custom Type is used to define the properties that can be applied to a specific object you want to create (e.g. legal document, newspaper photograph, a vehicle, etc).
- Aspects can be attached to an object and adds additional functionality and behaviours to the defined Custom Type.
- By creating 'generic' Aspects such as emailing or versioning, we can re-use Aspects and apply them to different Types of object. For example, a Legal document and a photograph might both need to be emailed as part of a workflow.
- This 'cross-cut concept' (or 'design once use many') enables us to create more efficient and simpler Content Models.
- Aspects in many circumstances are preferred over Custom Content Types.
- Types are created once and are difficult to change while the model is active.
- Aspects can be attached or detached automatically to an object through Rules created in the UI.
When you are deciding if an object should be modelled as a Type or an Aspect you should think about if the properties or actions relate to just one specific type of object or could be applicable to a generic range of objects.
Before you start creating your own Aspects, you should first check out what Aspects are already available in Alfresco, for example the Aspects mentioned above (emailed and versionable) are already available out-of-the-box.
One useful approach when you start to develop your own Aspects, is to base your new Aspect on an existing Aspect by selecting a Parent Aspect. Your new Aspect will then inherit all the properties from the Parent which you can then simply add to or adapt as needed.
What are Constraints?
Constraints allow us to control the input value of a property.
- There are 4 out of the box Constraints provided by Alfresco One:
- REGEX: Property value matches regular expression.
- LENGTH: Text property value length must reside within minimum and maximum length limits.
- MINMAX: Numeric property value must reside within minimum and maximum range limits.
- LIST: Property value must be one of those specified in the list of values.
What are Properties?
Properties play a central part of the content model definition as they define the metadata that should accompany the object (i.e. a file or a folder).
Metadata is central to a content management solution as it used to determine what can be searched, the rules that can be created, base policies on etc.
Properties can be defined for Types as well as Aspects.
The status of the model determines which fields can be modified after a model has been saved.
If the model status is 'Inactive' all the fields can be edited except for the Name.
However, if the status is 'Active', there are additional restrictions shown in the table below: