01-16-2018 01:29 AM
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.
01-16-2018 05:46 AM
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.
01-16-2018 04:23 AM
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?
01-16-2018 05:33 AM
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?
01-16-2018 05:46 AM
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.
01-16-2018 05:25 AM
Yeah making changes to existing applied model does give any error. It seems error lies in your model XML file.
Explore our Alfresco products with the links below. Use labels to filter content by product module.