Unable to force undeploy a case data model application. The following error is seen in the BPM.log -
"Illegal attempt to Uninstall a CaseModel while being in FAILED_TO_UNINSTALL State."
Issue/Introduction
Force Undeploy of Case Model fails with the error "Illegal attempt to Uninstall a Case Model while being in FAILED_TO_UNINSTALL State"
Environment
All Supported Operating Systems
Resolution
The following steps were followed to uninstall a CaseModel which was in a FAILED_TO_UNINSTALL state.
1). Drop the case model database tables for a particular version of the application manually using the delete scripts visible from Openspace -> Data Admin.
2). Use the notifyCleaned API call to notify the system that the case model database has been manually cleaned after the initial auto removal of the tables failed for that particular version.
3). Force undeploy the version of the case model application.
Additional Information
For Case Data Models Lifecycle -- TIBCO ActiveMatrix Openspace User's Guide > Data Admin -- Case Models. For Case Data Model Drop scripts -- TIBCO ActiveMatrix Openspace User's Guide > Data Admin -- Retreiving DROP Case Data Database Scripts. For notifyCleaned API -- TIBCO ActiveMatrix BPM Developer's Guide > BusinessDataServicesAdminService > notifyDDLExecution > REST API - notifyCleaned.