use of org.camunda.bpm.engine.impl.interceptor.CommandContext in project camunda-bpm-platform by camunda.
the class DecisionDefinitionEntity method loadDecisionDefinition.
/**
* Returns the cached version if exists; does not update the entity from the database in that case
*/
protected DecisionDefinitionEntity loadDecisionDefinition(String decisionDefinitionId) {
ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
DeploymentCache deploymentCache = configuration.getDeploymentCache();
DecisionDefinitionEntity decisionDefinition = deploymentCache.findDecisionDefinitionFromCache(decisionDefinitionId);
if (decisionDefinition == null) {
CommandContext commandContext = Context.getCommandContext();
DecisionDefinitionManager decisionDefinitionManager = commandContext.getDecisionDefinitionManager();
decisionDefinition = decisionDefinitionManager.findDecisionDefinitionById(decisionDefinitionId);
if (decisionDefinition != null) {
decisionDefinition = deploymentCache.resolveDecisionDefinition(decisionDefinition);
}
}
return decisionDefinition;
}
use of org.camunda.bpm.engine.impl.interceptor.CommandContext in project camunda-bpm-platform by camunda.
the class ExternalTaskEntity method produceHistoricExternalTaskDeletedEvent.
protected void produceHistoricExternalTaskDeletedEvent() {
CommandContext commandContext = Context.getCommandContext();
commandContext.getHistoricExternalTaskLogManager().fireExternalTaskDeletedEvent(this);
}
use of org.camunda.bpm.engine.impl.interceptor.CommandContext in project camunda-bpm-platform by camunda.
the class ExternalTaskEntity method deleteFromExecutionAndRuntimeTable.
protected void deleteFromExecutionAndRuntimeTable() {
getExecution().removeExternalTask(this);
CommandContext commandContext = Context.getCommandContext();
commandContext.getExternalTaskManager().delete(this);
// Also delete the external tasks's error details byte array
if (errorDetailsByteArrayId != null) {
commandContext.getByteArrayManager().deleteByteArrayById(errorDetailsByteArrayId);
}
}
use of org.camunda.bpm.engine.impl.interceptor.CommandContext in project camunda-bpm-platform by camunda.
the class ExternalTaskEntity method produceHistoricExternalTaskSuccessfulEvent.
protected void produceHistoricExternalTaskSuccessfulEvent() {
CommandContext commandContext = Context.getCommandContext();
commandContext.getHistoricExternalTaskLogManager().fireExternalTaskSuccessfulEvent(this);
}
use of org.camunda.bpm.engine.impl.interceptor.CommandContext in project camunda-bpm-platform by camunda.
the class ExternalTaskEntity method produceHistoricExternalTaskCreatedEvent.
protected void produceHistoricExternalTaskCreatedEvent() {
CommandContext commandContext = Context.getCommandContext();
commandContext.getHistoricExternalTaskLogManager().fireExternalTaskCreatedEvent(this);
}
Aggregations