Case Data Models
Case data is any business related concept that many BPM-based applications can operate on or be associated with.
For example, in an insurance company, case data may be both an insurance claim and the actual policy. For more information, see the TIBCO ActiveMatrix BPM Concepts Guide.
The GlobaldataAdminService API is used to administer 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. For more information, see TIBCO Business Studio Modeling Guide .
You can configure your system 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 the system so that you must manually execute the database scripts, you can use the GlobaldataAdminService functions to retrieve these scripts. You can then take these scripts, and optionally, make a number of supported changes on them, depending on your requirements.
Note that the case model must be in the correct state for the database script action you want to perform, as follows:
Deployment Life Cycle of a Case 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. For more information about application deployment lifecycles, see the TIBCO ActiveMatrix BPM Deployment Guide. You can tell where a case model is in its deployment lifecycle by its state.
The following diagram illustrates 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 the system.
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 the system 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 the system.
- FAILED_TO_UNINSTALL The scripts have not executed correctly on the database. You must clean-up your database and then, you must notify the system 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.