Custom Content Model does not show up in Alfresco Share Model Manager

cancel
Showing results for 
Search instead for 
Did you mean: 
supriyoece
Active Member

Custom Content Model does not show up in Alfresco Share Model Manager

Jump to solution

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 !!

1 Solution

Accepted Solutions
abhinavmishra14
Advanced

Re: Custom Content Model does not show up in Alfresco Share Model Manager

Jump 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.

  • Create the model in your custom module in '<yourCustomModule>/src/main/resources/alfresco/module/alfresco-module/model' directory.
  • Register the model:
  • <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. 

  1. Go to Alfresco admin console.
  2. In the left hand side you can see "Model and Messages Console", click to launch "Model and Messages Console page". 
  3. Execute "show models", it will display all the deployed models. You can also activate, deactivate, deploy and undeploy your models via this console.

Refer this doc for more details:

https://docs.alfresco.com/content-services/6.2/develop/repo-ext-points/content-model/#deployadmincon...

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.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View solution in original post

6 Replies
EddieMay
Alfresco Employee

Re: Custom Content Model does not show up in Alfresco Share Model Manager

Jump to solution

Hi @supriyoece,

Is there anything in the logs when you try to deploy your custom model? 

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
supriyoece
Active Member

Re: Custom Content Model does not show up in Alfresco Share Model Manager

Jump to solution

@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 !!

 

 

abhinavmishra14
Advanced

Re: Custom Content Model does not show up in Alfresco Share Model Manager

Jump 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.

  • Create the model in your custom module in '<yourCustomModule>/src/main/resources/alfresco/module/alfresco-module/model' directory.
  • Register the model:
  • <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. 

  1. Go to Alfresco admin console.
  2. In the left hand side you can see "Model and Messages Console", click to launch "Model and Messages Console page". 
  3. Execute "show models", it will display all the deployed models. You can also activate, deactivate, deploy and undeploy your models via this console.

Refer this doc for more details:

https://docs.alfresco.com/content-services/6.2/develop/repo-ext-points/content-model/#deployadmincon...

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.

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
supriyoece
Active Member

Re: Custom Content Model does not show up in Alfresco Share Model Manager

Jump to solution

@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. 

  1. Go to Alfresco admin cosole.
  2. In the left hand side you can see "Model and Messages Console", click to launch "Model and Messages Console page". 
  3. Execute "show models", it will display all the deployed models. You can also activate, deactivate, deploy and undeploy your models via this cosole.

 

EddieMay
Alfresco Employee

Re: Custom Content Model does not show up in Alfresco Share Model Manager

Jump to solution

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,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
cesarista
Customer

Re: Custom Content Model does not show up in Alfresco Share Model Manager

Jump to solution

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:

https://www.zylk.net/en/web-2-0/blog/-/blogs/-checking-details-about-bootstrap-content-models-in-alf...

Kind regards.

--C.