use of org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionDefinitionManager in project camunda-bpm-platform by camunda.
the class DeploymentManager method deleteDecisionDeployment.
protected void deleteDecisionDeployment(String deploymentId, boolean cascade) {
ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
if (processEngineConfiguration.isDmnEnabled()) {
DecisionDefinitionManager decisionDefinitionManager = getDecisionDefinitionManager();
List<DecisionDefinition> decisionDefinitions = decisionDefinitionManager.findDecisionDefinitionByDeploymentId(deploymentId);
if (cascade) {
// delete historic decision instances
for (DecisionDefinition decisionDefinition : decisionDefinitions) {
getHistoricDecisionInstanceManager().deleteHistoricDecisionInstancesByDecisionDefinitionId(decisionDefinition.getId());
}
}
// delete decision definitions from db
decisionDefinitionManager.deleteDecisionDefinitionsByDeploymentId(deploymentId);
DeploymentCache deploymentCache = processEngineConfiguration.getDeploymentCache();
for (DecisionDefinition decisionDefinition : decisionDefinitions) {
String decisionDefinitionId = decisionDefinition.getId();
// remove decision definitions from cache:
deploymentCache.removeDecisionDefinition(decisionDefinitionId);
}
}
}
use of org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionDefinitionManager in project camunda-bpm-platform by camunda.
the class DecisionDefinitionCache method findDeployedDefinitionByKeyAndVersion.
public DecisionDefinitionEntity findDeployedDefinitionByKeyAndVersion(String definitionKey, Integer definitionVersion) {
DecisionDefinitionEntity definition = ((DecisionDefinitionManager) getManager()).findDecisionDefinitionByKeyAndVersion(definitionKey, definitionVersion);
checkInvalidDefinitionByKeyAndVersion(definitionKey, definitionVersion, definition);
definition = resolveDefinition(definition);
return definition;
}
Aggregations