When I am deploying my custom model through bootstrap deployment(custom content model XML files are placed into tomcat/shared/classes/alfresco/extension) or dynamic approach(placing the custom model xml file directly in the content repository itself under Company Home/Data Dictionary/Models), the custom model are not showing up in Model Manager in Alfresco Share->Admin Tools.
I registered my custom model as below:-
<!-- Registration of my custom models -->
<bean id="mycustommodule.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/mycustommodel.xml</value>
</list>
</property>
</bean>
Can you please let me know if I am missing any step or how can I verify if my custom model got deployed successfully ?
Also, is there any DB query to verify if my custom model got deployed successfully?
FYI, I am using Alfresco Community edition 6.2 & also tried with Change Data Types of any existing documents, but my custom model is not appearing in drop down list. Thanks in advance !!
Solved! Go to Solution.
There are three ways to deploy content models.
1- Dynamic approach by uploading model file into the folder 'Data Dictionary/Models', and mark it active.
Refer this documentation here for more details: https://docs.alfresco.com/content-services/6.2/develop/repo-ext-points/content-model/#dynamic-deploy...
2- Deploying via '$TOMCAT_HOME/shared/classes/alfresco/extension' directory and configure 'dictionaryModelBootstrap' bean.
For example:
Model is copied here: $TOMCAT_HOME/shared/classes/alfresco/extension/myCustomModel.xml <!-- Registration of new models --> <bean id="myCustomModel.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap"> <property name="models"> <list> <value>alfresco/extension/myCustomModel.xml</value> </list> </property> </bean>
Refer this documentation here for more details: https://docs.alfresco.com/content-services/6.2/develop/repo-ext-points/content-model/
3- Bootstrapping via a custom module.
<bean id="myCustomModel.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap"> <property name="models"> <list> <value>alfresco/module/${project.artifactId}/model/myCustomModel.xml</value> </list> </property> </bean>
Refer this documentation here for more details:
https://docs.alfresco.com/6.2/tasks/dev-extensions-content-models-tutorials-deploy-model.html
In 2nd and 3rd approach steps are almost the same.
You can verify if you model is deployed or not via admin console.
Refer this doc for more details:
You may have deployed the model in 'Data Dictionary/Models' but may have not activated it. Please check whether you have followed the correct steps following the docs. The if your model does't have any xml parsing error or unsupported items. Generally you would see failure errors in alfresco.log.
With boostrapping approach, server doesn't turn up if there are any errors in the model.
Hi @supriyoece,
Is there anything in the logs when you try to deploy your custom model?
Cheers,
@EddieMay , I did not see any specific errors related to my custom content model in Tomcat or Alfresco logs. Is there any specific log I need to refer?
In general, when I deploy a custom model without using Share Admin tools-> Model Manager, does it show up in Share Model Manager ? Is there any other way to verify if the model got deployed successfully?
Thanks !!
There are three ways to deploy content models.
1- Dynamic approach by uploading model file into the folder 'Data Dictionary/Models', and mark it active.
Refer this documentation here for more details: https://docs.alfresco.com/content-services/6.2/develop/repo-ext-points/content-model/#dynamic-deploy...
2- Deploying via '$TOMCAT_HOME/shared/classes/alfresco/extension' directory and configure 'dictionaryModelBootstrap' bean.
For example:
Model is copied here: $TOMCAT_HOME/shared/classes/alfresco/extension/myCustomModel.xml <!-- Registration of new models --> <bean id="myCustomModel.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap"> <property name="models"> <list> <value>alfresco/extension/myCustomModel.xml</value> </list> </property> </bean>
Refer this documentation here for more details: https://docs.alfresco.com/content-services/6.2/develop/repo-ext-points/content-model/
3- Bootstrapping via a custom module.
<bean id="myCustomModel.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap"> <property name="models"> <list> <value>alfresco/module/${project.artifactId}/model/myCustomModel.xml</value> </list> </property> </bean>
Refer this documentation here for more details:
https://docs.alfresco.com/6.2/tasks/dev-extensions-content-models-tutorials-deploy-model.html
In 2nd and 3rd approach steps are almost the same.
You can verify if you model is deployed or not via admin console.
Refer this doc for more details:
You may have deployed the model in 'Data Dictionary/Models' but may have not activated it. Please check whether you have followed the correct steps following the docs. The if your model does't have any xml parsing error or unsupported items. Generally you would see failure errors in alfresco.log.
With boostrapping approach, server doesn't turn up if there are any errors in the model.
@abhinavmishra14 , thank you for your reply & detailed suggestions. Aplologies for the delayed response from my end.
I was able to verify my custom model from the Alfresco Admin interface using your below advice. Previously, I was trying to verify the same from Alfresco Share->Admin Console under Module Manager from where it was not showing up.
You can verify if you model is deployed or not via admin console.
Hi @supriyoece,
Thank you for accepting the solution provided by @abhinavmishra14 - it's really helpful to other users to know this worked for you.
Best wishes,
Hi:
A custom bootstrap content model is not going to be shown in Model Manager.
Additionally to what it is mentioned in the thread, you can check a content model in Alfresco repository with this:
Kind regards.
--C.
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.