I currently have an active custom model, generated by xml and one of the types is currently applied to a node.
When attempting to modify the code definition of the model (adding an aspect), I can't save the changes:
1. Is this because the type is active and applied?
2. Is there a way to modify models while they are applied? - as only one file is using the model currently, it's not a problem, but when applied further this could cause some real issues down the line if the model needs to change.
Solved! Go to Solution.
Yes, you can.
But if what you need is to have the aspect as mandatory-aspect for a custom type, then you will have to go using two steps, being the first one to create the new aspect, but not defining it as mandatory-aspect.
Use some kind of batch processing to attach the new aspect to all the existing documents with this custom type.
After that, change the content model, but this time, defining the aspect as mandatory, and then, publish this new content model.
By doing to, all the new documents created after this second content model publication will have the aspect attached automatically for you.
Hello.
It all depends on the change you are performing.
When you say "adding an aspect", what exactly do you mean?
Are you simply creating a new aspect definition?
Are you configuring the aspect as mandatory inside the type?
Can you share the content model xml file and highlight the changes you have made?
Yeah making changes to existing applied model does give any error. It seems error lies in your model XML file.
Sadly I can't provide the xml file just now, but I was configuring the new aspect as mandatory.
I assume from your answer that that's where I was going wrong.
But I can add an aspect definition that isn't marked as mandatory?
Yes, you can.
But if what you need is to have the aspect as mandatory-aspect for a custom type, then you will have to go using two steps, being the first one to create the new aspect, but not defining it as mandatory-aspect.
Use some kind of batch processing to attach the new aspect to all the existing documents with this custom type.
After that, change the content model, but this time, defining the aspect as mandatory, and then, publish this new content model.
By doing to, all the new documents created after this second content model publication will have the aspect attached automatically for you.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.