protected void removeAllCaseDefinitionsByDeploymentId(String deploymentId) {
// remove all case definitions for a specific deployment
CommandContext commandContext = Context.getCommandContext();
List<CaseDefinition> allDefinitionsForDeployment = new CaseDefinitionQueryImpl(commandContext)
.deploymentId(deploymentId)
.list();
for (CaseDefinition caseDefinition : allDefinitionsForDeployment) {
try {