public ProcessApplicationReference execute(CommandContext commandContext) { ProcessEngineConfigurationImpl configuration = commandContext.ProcessEngineConfiguration; DeploymentCache deploymentCache = configuration.DeploymentCache; DecisionDefinitionEntity definition = deploymentCache.findDeployedDecisionDefinitionById(definitionId); return(ProcessApplicationContextUtil.getTargetProcessApplication(definition)); }
public virtual DecisionDefinition execute(CommandContext commandContext) { ensureNotNull("decisionDefinitionId", decisionDefinitionId); DeploymentCache deploymentCache = Context.ProcessEngineConfiguration.DeploymentCache; DecisionDefinitionEntity decisionDefinition = deploymentCache.findDeployedDecisionDefinitionById(decisionDefinitionId); foreach (CommandChecker checker in commandContext.ProcessEngineConfiguration.CommandCheckers) { checker.checkReadDecisionDefinition(decisionDefinition); } return(decisionDefinition); }
public virtual Void execute(CommandContext commandContext) { checkAuthorization(commandContext); ensureNotNull(typeof(BadUserRequestException), "decisionDefinitionId", decisionDefinitionId); if (historyTimeToLive != null) { ensureGreaterThanOrEqual(typeof(BadUserRequestException), "", "historyTimeToLive", historyTimeToLive, 0); } DecisionDefinitionEntity decisionDefinitionEntity = commandContext.DecisionDefinitionManager.findDecisionDefinitionById(decisionDefinitionId); logUserOperation(commandContext, decisionDefinitionEntity); decisionDefinitionEntity.HistoryTimeToLive = historyTimeToLive; return(null); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void getPreviousDecisionDefinitionWithTenantId() public virtual void getPreviousDecisionDefinitionWithTenantId() { testRule.deployForTenant(TENANT_ONE, DMN); testRule.deployForTenant(TENANT_ONE, DMN); testRule.deployForTenant(TENANT_ONE, DMN); testRule.deployForTenant(TENANT_TWO, DMN); testRule.deployForTenant(TENANT_TWO, DMN); IList <DecisionDefinition> latestDefinitions = repositoryService.createDecisionDefinitionQuery().latestVersion().orderByTenantId().asc().list(); DecisionDefinitionEntity previousDefinitionTenantOne = getPreviousDefinition((DecisionDefinitionEntity)latestDefinitions[0]); DecisionDefinitionEntity previousDefinitionTenantTwo = getPreviousDefinition((DecisionDefinitionEntity)latestDefinitions[1]); assertThat(previousDefinitionTenantOne.Version, @is(2)); assertThat(previousDefinitionTenantOne.TenantId, @is(TENANT_ONE)); assertThat(previousDefinitionTenantTwo.Version, @is(1)); assertThat(previousDefinitionTenantTwo.TenantId, @is(TENANT_TWO)); }
public virtual object execute(CommandContext commandContext) { ensureNotNull("decisionDefinitionId", decisionDefinitionId); DecisionDefinitionEntity decisionDefinition = commandContext.DecisionDefinitionManager.findDecisionDefinitionById(decisionDefinitionId); ensureNotNull("No decision definition found with id: " + decisionDefinitionId, "decisionDefinition", decisionDefinition); foreach (CommandChecker checker in commandContext.ProcessEngineConfiguration.CommandCheckers) { checker.checkDeleteHistoricDecisionInstance(decisionDefinition.Key); } long numInstances = getDecisionInstanceCount(commandContext); writeUserOperationLog(commandContext, numInstances); commandContext.HistoricDecisionInstanceManager.deleteHistoricDecisionInstancesByDecisionDefinitionId(decisionDefinitionId); return(null); }
public virtual IDmnModelInstance Execute(CommandContext commandContext) { EnsureUtil.EnsureNotNull("decisionDefinitionId", DecisionDefinitionId); DeploymentCache deploymentCache = Context.ProcessEngineConfiguration.DeploymentCache; DecisionDefinitionEntity decisionDefinition = deploymentCache.FindDeployedDecisionDefinitionById(DecisionDefinitionId); foreach (ICommandChecker checker in commandContext.ProcessEngineConfiguration.CommandCheckers) { checker.CheckReadDecisionDefinition(decisionDefinition); } IDmnModelInstance modelInstance = deploymentCache.FindDmnModelInstanceForDecisionDefinition(DecisionDefinitionId); EnsureUtil.EnsureNotNull(typeof(DmnModelInstanceNotFoundException), "No DMN model instance found for decision definition id " + DecisionDefinitionId, "modelInstance", modelInstance); return(modelInstance); return(null); }
protected internal virtual void logUserOperation(CommandContext commandContext, DecisionDefinitionEntity decisionDefinitionEntity) { IList <PropertyChange> propertyChanges = new List <PropertyChange>(); propertyChanges.Add(new PropertyChange("historyTimeToLive", decisionDefinitionEntity.HistoryTimeToLive, historyTimeToLive)); propertyChanges.Add(new PropertyChange("decisionDefinitionId", null, decisionDefinitionId)); propertyChanges.Add(new PropertyChange("decisionDefinitionKey", null, decisionDefinitionEntity.Key)); commandContext.OperationLogManager.logDecisionDefinitionOperation(org.camunda.bpm.engine.history.UserOperationLogEntry_Fields.OPERATION_TYPE_UPDATE_HISTORY_TIME_TO_LIVE, propertyChanges); }
public virtual void addDecisionDefinition(DecisionDefinitionEntity decisionDefinition) { decisionDefinitionCache.addDefinition(decisionDefinition); }
public virtual DecisionDefinitionEntity resolveDecisionDefinition(DecisionDefinitionEntity decisionDefinition) { return(decisionDefinitionCache.resolveDefinition(decisionDefinition)); }
public virtual void AddDecisionDefinition(DecisionDefinitionEntity decisionDefinition) { _decisionDefinitionCache.AddDefinition(decisionDefinition); }