In previous few articles like content modeling in Alfresco I have explained about content models in alfresco now there is one great feature in alfresco which enables you to create and use Content model on the fly without Restarting server.
Location of Dynamic custom models: Company Home -> Data Dictionary -> Models. The associated message resource bundles Location: Company Home -> Data Dictionary -> Messages
How to Deploy and activate a custom model?
Upload a custom XML model file to the ‘Models’ space. By default, the model will not be active unless the ‘Model Active’ checkbox is selected during the upload. To activate a previously inactive model, select ‘View Details’ and then select the ‘Modify’ properties icon. In the ‘Modify Content Properties’ page, select the ‘Model Active’ checkbox.
How to update custom model?
Edit or update the XML model file. If the model is active then it will be re-loaded. If the file is checked-out then the working copy will be ignored until such time that the file is checked-in.
NOTE: Only incremental updates are supported for an active model. If the update attempts to delete a type, aspect, property (etc) then the upload will fail. The reason for the failure can be seen in the Alfresco console, although the web client may (currently) display a more cryptic error message such as ‘A system error happened during the operation: Unknown Exception in Transaction.’
How to deactivate a custom model?
To deactivate a model, select ‘View Details’ and then select the ‘Modify’ properties icon. In the ‘Modify Content Properties’ page, unselect the ‘Model Active’ check box.
To delete a model, select Delete.
NOTE: The model can only be deleted if there are no existing usages, otherwise the delete will fail. The reason for the failure can be seen in the Alfresco console, although the web client may display a more cryptic error message such as ‘A system error happened during the operation: Unknown Exception in Transaction.’ or ‘Unable to delete File due to system error:’ “No existing usages” includes deleted items that are still accessible through Manage Deleted Items in the user profile and settings page.
Using the Repository Admin Console
The Repository Admin console can be used (as an alternative to the Web Client) to deploy, activate and deactivate models. It can also be used to deploy, re-load and undeploy message resource bundles.
Updating and re-loading web client configuration
If the ‘web-client-config-custom.xml‘ file has been added, edited or updated, it can be dynamically reloaded by using the web client config console via:
This has a single command ‘reload’ which will cause the web client configuration to be re-loaded. Depending on your setup, you will see console output such as:
If the file is checked-out then the working copy will be ignored until such time that is it checked-in.
NOTE: Unlike dynamic models, the configuration file does not have an active/inactive flag. Hence, even if you do not dynamically re-load the configuration after the update, it will still be loaded next time the server is restarted. If the config is invalid (e.g. cannot be parsed) then it will be skipped during loading and an error will be logged.
This will certainly save your lot of development time. Hope this helps you.