Introduction to Case Data Models

Applications with case data use case model database schema generation. This means that when an application that has case data is deployed, a complete set of database tables is generated for that application.

Case data is defined in business object models in TIBCO Business Studio. See TIBCO Business Studio Modeling Guide for more information.

You can configure TIBCO ActiveMatrix BPM to automatically execute the CREATE/UPDATE/DROP database scripts created from the successful deployment of an application that uses case data.

If you have configured TIBCO ActiveMatrix BPM so that you must manually execute the database scripts, you can use the Business Data Services Admin Service to retrieve these scripts. You can then take these scripts, and, optionally, make a number of supported changes on them, depending on your requirements. Once you have verified them and executed them in your database, you can use the APIs to notify TIBCO ActiveMatrix BPM. It is only when TIBCO ActiveMatrix BPM has been notified that the database schema is generated that process instances can be run from the application and access the case data defined in the new case data model.

Case models have a deployment lifecycle. In other words, you can deploy new versions and obtain UPDATE database scripts. Similarly, you can use the DROP scripts to remove the case data from the database. See TIBCO ActiveMatrix BPM Deployment Guide for more information about application deployment lifecycles. You can tell where a case model is in its deployment lifecycle by its state.

The following diagram explains the deployment cycle of a case model.

  • INITIAL. This describes the initial state of the application. The application is either still in the process of deploying or is undeployed.
  • PENDING_DBA_TO_INSTALL. The CREATE/UPDATE scripts are ready for retrieval. You must retrieve the scripts and manually execute them on your database to generate the case model database schema. Once the scripts have been executed, you must notify TIBCO ActiveMatrix BPM.

    If the first version of an application is undeployed before the UPDATE scripts for a new version of the application have been executed, then the case model’s state changes to PENDING_DBA_TO UNINSTALL so the DROP scripts can be retrieved.

  • INSTALLED. A case model has a state of INSTALLED if the CREATE/UPDATE scripts have been executed and TIBCO ActiveMatrix BPM has been notified. Process instances may exist for the application.
  • PENDING_DBA_TO_UNINSTALL. The DROP script is ready for retrieval. You must retrieve the scripts and manually execute them on your database to drop the case model database schema. Once the scripts have been deleted or dropped, you must notify TIBCO ActiveMatrix BPM.
  • FAILED_TO_UNINSTALL The scripts have not executed correctly on the database. You must clean-up your database and then, you must notify TIBCO ActiveMatrix BPM when the clean-up is complete.
  • DELETED. The DROP script has been executed and the case model database tables deleted. The case model is removed.

The BusinessDataServicesAdminService API provides operations that allow you to administer case models in your BPM runtime. These are: