Hi, I created custom model, that is extending cmis:document, in alfresco share an exported it as zip with two xmls. Now for deployment I want that exported model to be automaticaly imported to alfresco docker container, so I dont have to import it manualy each time. It this possible ? I have not found those xmls in docker container files, I only found namespace and types in database.
Solved! Go to Solution.
For anyone wondering I had to add NAME-context.xml next to tomcat/shared/classes/alfresco/extension/custom-document.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="myCustomModel.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/custom-document.xml</value>
</list>
</property>
</bean>
</beans>
Dont know If it nessesary but at least I know that when custom document is deployed it is not shown in alfresco share model mannager or alfresco console command show models. If alfresco start up correctly better to test it with document upload or import .zip file with same custom document name
There is no out-of-the-box option to import a Content Model from a ZIP file.
You can design the content model in XML to be deployed in repo part and the forms in XML to be deployed in share. This allows you to deploy them automatically on every deployment:
https://docs.alfresco.com/content-services/latest/develop/repo-ext-points/content-model/
Thanks.
So If i understant it correctly, when I created custom model in alfresco share and then export it it gives me 2 files. One where root element is model(there are imports, namespace and types) and secon one where root element is module(there is configuration). So first one with model is actual model and I should copy it to alfresco docker tomcat/shared/classes/alfresco/extension/NAME.xml. Second one is for alfresco share, so document could be viewed in browser so it shoul be copied to alfresco share docker tomcat/shared/classes/alfresco/web-extension/NAME.xml. So I did, checked that files are there, alfresco recognise it because firstly there were errors and when I correced them alfresco started normaly. But there is still no my custom model shown in alfresco share or alfresco console. What can be tha cause ?
For anyone wondering I had to add NAME-context.xml next to tomcat/shared/classes/alfresco/extension/custom-document.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="myCustomModel.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/custom-document.xml</value>
</list>
</property>
</bean>
</beans>
Dont know If it nessesary but at least I know that when custom document is deployed it is not shown in alfresco share model mannager or alfresco console command show models. If alfresco start up correctly better to test it with document upload or import .zip file with same custom document name
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.