Hi,
how can I add aspect to type in a model with "Model Manager"?
Seems it is not possible.
Thanks.
You're right.
Limitations of Model Manager in Alfresco Share
The Model Manager in Alfresco Share offers a user-friendly way to define custom types, aspects, and properties, but it comes with several notable limitations:
The only alternative I see is creating a Folder Rule or similar, so the type / aspect(s) is set automatically when a document is created. In any case, doing the maintenance of a custom content model is not an easy task. This is mainly why I prefer to deploy models as an independent Repository addon.
Thanks Angel. I need to add aspect to type because I have to choose type when upload a document and then set the related properties. Moreover I would be able to change the type and then the properties of a document. But, probably it could not be done because once the type is set, is not possible to modify it, isn't it? Probably I can manage the different properties over different type with aspects. I mean that also the type should be an aspect. And I need to use "model manager" because after the implementation the customer will do application maintenance themself.
Given these limitations, is the xsd or a very complete exampleModel.xml available somewhere? The old link I have is long gone, and the .sample files in the tomcat/shared... directory are really minimal.
Are the default cm:content and cm:folder bootstrap-xml files available as well? Maybe somewhere in github?
Thanks!
The most complete and reliable reference you can use today is the source code itself. The full Alfresco Content Model (including cm:content, cm:folder, constraints, types, aspects, and properties) is still available in the public repository.
Primary reference:
contentModel.xml in the Alfresco GitHub repo:https://github.com/Alfresco/alfresco-data-model/blob/master/src/main/resources/alfresco/model/contentModel.xml
This file contains the full, canonical definition of all default types and aspects. It is far more complete than the sample bootstrap files and is the right place to look when you need the exact structure of the “cm” namespace or want to understand how the default models are built.
For step-by-step guidance on creating or extending your own custom model (including model XML, bootstrap configuration, and deployment best practices), Hyland publishes two official tutorials:
Alfresco Content Models – Core Concepts and Exampleshttps://support.hyland.com/r/Alfresco/Alfresco-Content-Services/25.2/Alfresco-Content-Services/Develop/In-Process-Platform-Extension-Points/Content-Model-Extension-Point/Defining-and-Deploying
Creating and Deploying Custom Content Modelshttps://support.hyland.com/r/Alfresco/Alfresco-Content-Services/25.2/Alfresco-Content-Services/Tutorials/Develop-a-Platform-Extension/Content-Model-Tutorials
For a more developer-oriented narrative with working examples, you can also use my Alfresco Developer Series tutorial:
https://aborroy.github.io/alfresco-developer-series/content/tutorial/tutorial/
@ajweberI have followed this tutorial shared by @angelborroyand I found it very usefull:
Thank you very much for the detailed reply. The tutorial pages are great!
The other links (especially the first one) are 404's for me.
EDIT: Found the model-xml: https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/resources/alfresco/model/contentModel.xml
One thing I was specifically looking for was recommendations for:
Thanks again. All the best!
404's for me too.
@angelborroyI've created a rule on a folder in order to manage the change of document type. The rule is: when a document is update and the type is like 'Tipo_Attestazione_TRF' add the following aspects: 'Attestazione TRF', 'Area Tematica', 'Oggetto'
Why this kind of rule works:
while the following rule doesn't:
Seems like the change of a category trigger the rule while the change of type doesn't.
It is a normal beaviour in alfresco?