Hello,
I have been searching a lot, but I didn't find yet any possible solution to how (or even if) this is possible to do it.
I have one Alfresco Community installed on one machine, and other installed on another machine. I have created via Alfresco web UI a custom data model with Model Manager tool. Now, I want to export it, and then, import it in the other machine. Which ways would I have to do that?
I was thinking to do it with Java and API rest (like working with Alfresco nodes), but I think this is not possible.I am trying to do some type of application/process to do that, but I am a bit lost right know.
Any help will be appreciated.
Thanks.
Solved! Go to Solution.
Hi Odpas,
I assume you're referring to Share Content Model Manager (CMM) ?
Content modeling with Model Manager | Alfresco Documentation
If you can analyse the calls from Share CMM to the Repository, you will see that Share uses a "private" CMM REST API.
You may be able to use this private API to deploy (dynamic) models that remain compatible with Share CMM ? Please be aware the API is not public, hence subject to change at any time (ie. not officially documented or supported - in terms of backwards compatibility). There are also some limitations for models supported via Share CMM, so your mileage may vary. Please run your own modelling tests (and also search JIRA).
Alternatively, you can also manage Dynamic Models via the public APIs (CMIS or REST):
Deploying a content model: dynamic approach | Alfresco Documentation
In this case, you will need to construct a valid XML content model. As an admin, this can be uploaded to the "/Data Dictionary/Models" folder and activated (by setting "cm:modelActive" property to true) - using Share &/or public APIs:
alfresco-repository/contentModel.xml at master · Alfresco/alfresco-repository · GitHub
It should be noted that dynamic model changes must be "incremental". Dynamic models can only be deleted if there are no existing references. In the future, it might be useful to support a non-incremental development mode. This would be similar to updating / removing static models (and potentially leaving residual references &/or broken behaviours that depend on the model).
Regards,
Jan
Hi Odpas,
I assume you're referring to Share Content Model Manager (CMM) ?
Content modeling with Model Manager | Alfresco Documentation
If you can analyse the calls from Share CMM to the Repository, you will see that Share uses a "private" CMM REST API.
You may be able to use this private API to deploy (dynamic) models that remain compatible with Share CMM ? Please be aware the API is not public, hence subject to change at any time (ie. not officially documented or supported - in terms of backwards compatibility). There are also some limitations for models supported via Share CMM, so your mileage may vary. Please run your own modelling tests (and also search JIRA).
Alternatively, you can also manage Dynamic Models via the public APIs (CMIS or REST):
Deploying a content model: dynamic approach | Alfresco Documentation
In this case, you will need to construct a valid XML content model. As an admin, this can be uploaded to the "/Data Dictionary/Models" folder and activated (by setting "cm:modelActive" property to true) - using Share &/or public APIs:
alfresco-repository/contentModel.xml at master · Alfresco/alfresco-repository · GitHub
It should be noted that dynamic model changes must be "incremental". Dynamic models can only be deleted if there are no existing references. In the future, it might be useful to support a non-incremental development mode. This would be similar to updating / removing static models (and potentially leaving residual references &/or broken behaviours that depend on the model).
Regards,
Jan
@Jan Vonka, Great answer.
You were very helpful. I will try with Dynamic Models via the public APIs (CMIS or REST) approach.
Thanks.
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.