Retrieving Case Model Database Scripts

You can manually execute the case model database scripts.

The following diagram shows an example of the calls to the GlobaldataAdminService to do this.

Procedure

  1. Find out the case models that are deployed by calling getCaseModelBasicInfo.

    If you do not specify an application name, all case models are returned.

    Information about the deployed case models is returned, for example, case model ID and major version number.

  2. Use getCaseModel to retrieve the database scripts.

    Specify the name of the application whose scripts you want to retrieve. If you do not specify an application name, all database scripts are retrieved.

    The response returns:

    • the case model details. For example, appName, caseModelID and currentVersion.
    • the version number of the currently installed case model. If a case model is installed, it means all the database scripts have been run and case data may exist.
    • The last time the case model has been updated and the date and time that this occurred. After initial deployment, it shows the deployment time.
    • The CREATE database script. If the application has been updated, the UPDATE database script is also returned. If the case model is in the INSTALLED state, the DROP script is also returned.
    • Whether or not the case model is frozen and the operation details. For example, who performed the operation, when and why.
    • The case model’s state.
  3. (Optional) Use updateDBScripts to make any required changes to the database scripts.
    Note: Although editing the scripts is possible, this not recommend unless it is essential and there are only a few changes that you are allowed to make.
  4. Once you have verified your database scripts, you must manually execute them on your database to generate the case model database schema. Once the case model database schema has been generated, you must notify the system using notifyCreated.
  5. You can freeze case data models so that no further changes can be made to it. In other words, the case model cannot be upgraded or undeployed. This prevents another database administrator from making any further changes to the case data model. To do this, use notifyFreeze.