OpenWGA 7.10 - OpenWGA Concepts and Features

Design and development » HDBModel framework

Updating models

OpenWGA automatically picks up changes you make on a hdb-model.xml for a running application.

However if your changes include instructions that need to modify existing data - like adding new item definitions, setting readers or editors restrictions - then these modifications are not done directly. Instead it is up to the administrator to decide when a model reinitialisation is to be done which will update existing data with the instructions from the model.

The reinitialisation is done on two occasions:

  • When reconnecting the app. OpenWGA will run an asynchronous reinitialisation process after the reconnect has happened. The app will already be online at this time.
  • When manually triggering a model reinitialisation which you can do like this:
    • In OpenWGA admin client enable the "expert mode" by the checkbox to he top right
    • Open the configuration of the web app which has an updated hdb-model.xml
    • On the "Database" actions menu on right of the section "Contentstore configuration" you should find a menu item "Enforce new HDBModel definition" if a new hdb-model.xml has been detected


    • Click it to start an asynchronous reinitialisation process. The app will continue to be online at this time.

In either case you can check if the reinitialisation process has finished by clicking button "Runtime info" to the top right. There in the first section you should find an entry called "HDB Model Status" which shows "Up to date" when reinitialisation is finished:

screenshot at 2014-04-01 11:52:34.png

Best practice for live applications

When you have a live application where you want to upgrade the HDB Model it is worth to consider the right order of operations.

Chances are you have updated not only your hdb-model.xml. You also have changed your design in a way that it will only work once the model has been reinitialized. This means: If you update the design of your live application before the new model has been enforced your application will not work correctly.

Also you do not want to have any downtime and upgrade your app "live" while it is online.

Here is what you can do to upgrade your application:

  • Prerequisites
    • For these cases your app design should be in a regular design directory, not a plugin. We need to update individual design resources on the server which is impossible if you use a plugin.
    • Ensure that your old design - the one that is currently active on your live app - works with your new HDBModel definition. This will be the case in most normal model changes which only introduce new items or storage structures. For other, problematic changes you might need to actually have downtime to do the upgrade.
  • Perform a design synchronisation from your WDS to your live server (Right-click on Project, in the menu "OpenWGA > Synchronize...")
    • Only push your hdb-model.xml to your live server. Leave all other design resources unsynchronized
  • On the OpenWGA admin client of your live server start a manual model reinitialisation like described above. You might need to way some seconds until the OpenWGA server has picked up the updated hdb-model.xml.
  • Wait until the reinitialisation is done by checking the "Runtime info" described above
  • Now your app is ready to receive the new design. Return to WDS ans push all other design resources to your live server.