07-24-2020 12:16 PM
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 !!
07-24-2020 01:22 PM
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.
07-24-2020 12:25 PM
Hi @supriyoece,
Is there anything in the logs when you try to deploy your custom model?
Cheers,
07-24-2020 12:33 PM
@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 !!
07-24-2020 01:22 PM
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.
07-28-2020 12:34 PM
@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.
07-29-2020 06:03 AM
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,
07-29-2020 10:00 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.