public InstantiationStack(List<PvmActivity> activities, PvmActivity targetActivity, PvmTransition targetTransition) { EnsureUtil.ensureOnlyOneNotNull("target must be either a transition or an activity", targetActivity, targetTransition); this.activities = activities; // TODO: make this a subclass that contains targetActivity and targetTransition?! this.targetActivity = targetActivity; this.targetTransition = targetTransition; }
public InstantiationStack(List<PvmActivity> activities, PvmActivity targetActivity, PvmTransition targetTransition) { EnsureUtil.ensureOnlyOneNotNull("target must be either a transition or an activity", targetActivity, targetTransition); this.activities = activities; // TODO: make this a subclass that contains targetActivity and targetTransition?! this.targetActivity = targetActivity; this.targetTransition = targetTransition; }
protected void validateParameters() { ensureOnlyOneNotNull("Need to specify either a job definition id, a process definition id or a process definition key.", jobDefinitionId, processDefinitionId, processDefinitionKey); if (isProcessDefinitionTenantIdSet && (jobDefinitionId != null || processDefinitionId != null)) { throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey(); } ensureNotNull("commandExecutor", commandExecutor); }
protected void validateParameters() { ensureOnlyOneNotNull("Need to specify either a job definition id, a process definition id or a process definition key.", jobDefinitionId, processDefinitionId, processDefinitionKey); if (isProcessDefinitionTenantIdSet && (jobDefinitionId != null || processDefinitionId != null)) { throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey(); } ensureNotNull("commandExecutor", commandExecutor); }
protected void validateParameters() { ensureOnlyOneNotNull("Need to specify either a process instance id or a process definition key.", processDefinitionId, processDefinitionKey); if(processDefinitionId != null && isTenantIdSet) { throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey(); } ensureNotNull("commandExecutor", commandExecutor); }
protected void validateParameters() { ensureOnlyOneNotNull("Need to specify either a process instance id, a process definition id or a process definition key.", processInstanceId, processDefinitionId, processDefinitionKey); if (isProcessDefinitionTenantIdSet && (processInstanceId != null || processDefinitionId != null)) { throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey(); } ensureNotNull("commandExecutor", commandExecutor); }
protected void validateParameters() { ensureOnlyOneNotNull("Need to specify either a job id, a job definition id, a process instance id, a process definition id or a process definition key.", jobId, jobDefinitionId, processInstanceId, processDefinitionId, processDefinitionKey); if (isProcessDefinitionTenantIdSet && (jobId != null || jobDefinitionId != null || processInstanceId != null || processDefinitionId != null)) { throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey(); } ensureNotNull("commandExecutor", commandExecutor); }
protected void validateParameters() { ensureOnlyOneNotNull("Need to specify either a process instance id, a process definition id or a process definition key.", processInstanceId, processDefinitionId, processDefinitionKey); if (isProcessDefinitionTenantIdSet && (processInstanceId != null || processDefinitionId != null)) { throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey(); } ensureNotNull("commandExecutor", commandExecutor); }
protected void validateParameters() { ensureOnlyOneNotNull("Need to specify either a job id, a job definition id, a process instance id, a process definition id or a process definition key.", jobId, jobDefinitionId, processInstanceId, processDefinitionId, processDefinitionKey); if (isProcessDefinitionTenantIdSet && (jobId != null || jobDefinitionId != null || processInstanceId != null || processDefinitionId != null)) { throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey(); } ensureNotNull("commandExecutor", commandExecutor); }
protected void validateParameters() { ensureOnlyOneNotNull("Need to specify either a process instance id or a process definition key.", processDefinitionId, processDefinitionKey); if(processDefinitionId != null && isTenantIdSet) { throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey(); } ensureNotNull("commandExecutor", commandExecutor); }
@Override public void delete() { ensureOnlyOneNotNull(NullValueException.class, "'processDefinitionKey' or 'processDefinitionIds' cannot be null", processDefinitionKey, processDefinitionIds); Command<Void> command; if (processDefinitionKey != null) { command = new DeleteProcessDefinitionsByKeyCmd(processDefinitionKey, cascade, skipCustomListeners, skipIoMappings, tenantId, isTenantIdSet); } else if (processDefinitionIds != null && !processDefinitionIds.isEmpty()) { command = new DeleteProcessDefinitionsByIdsCmd(processDefinitionIds, cascade, skipCustomListeners, skipIoMappings); } else { return; } commandExecutor.execute(command); }
@Override public void delete() { ensureOnlyOneNotNull(NullValueException.class, "'processDefinitionKey' or 'processDefinitionIds' cannot be null", processDefinitionKey, processDefinitionIds); Command<Void> command; if (processDefinitionKey != null) { command = new DeleteProcessDefinitionsByKeyCmd(processDefinitionKey, cascade, skipCustomListeners, skipIoMappings, tenantId, isTenantIdSet); } else if (processDefinitionIds != null && !processDefinitionIds.isEmpty()) { command = new DeleteProcessDefinitionsByIdsCmd(processDefinitionIds, cascade, skipCustomListeners, skipIoMappings); } else { return; } commandExecutor.execute(command); }
@Override public ProcessDefinitionEntity execute(CommandContext commandContext) { ensureOnlyOneNotNull("either process definition id or key must be set", processDefinitionId, processDefinitionKey); ProcessDefinitionEntity processDefinition = find(commandContext); if (checkReadPermission) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkReadProcessDefinition(processDefinition); } } return processDefinition; }
@Override public ProcessDefinitionEntity execute(CommandContext commandContext) { ensureOnlyOneNotNull("either process definition id or key must be set", processDefinitionId, processDefinitionKey); ProcessDefinitionEntity processDefinition = find(commandContext); if (checkReadPermission) { for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkReadProcessDefinition(processDefinition); } } return processDefinition; }
protected void validate() { ensureOnlyOneNotNull("Authorization must either have a 'userId' or a 'groupId'.", authorization.getUserId(), authorization.getGroupId()); ensureNotNull("Authorization 'resourceType' cannot be null.", "authorization.getResource()", authorization.getResource()); }
protected void validate() { ensureOnlyOneNotNull("Authorization must either have a 'userId' or a 'groupId'.", authorization.getUserId(), authorization.getGroupId()); ensureNotNull("Authorization 'resourceType' cannot be null.", "authorization.getResource()", authorization.getResource()); }
@Override public DmnDecisionResult execute(CommandContext commandContext) { ensureOnlyOneNotNull("either decision definition id or key must be set", decisionDefinitionId, decisionDefinitionKey); DecisionDefinition decisionDefinition = getDecisionDefinition(commandContext); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkEvaluateDecision(decisionDefinition); } return doEvaluateDecision(decisionDefinition, variables); }
@Override public DmnDecisionTableResult execute(CommandContext commandContext) { ensureOnlyOneNotNull("either decision definition id or key must be set", decisionDefinitionId, decisionDefinitionKey); DecisionDefinition decisionDefinition = getDecisionDefinition(commandContext); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkEvaluateDecision(decisionDefinition); } return doEvaluateDecision(decisionDefinition, variables); }
@Override public DmnDecisionResult execute(CommandContext commandContext) { ensureOnlyOneNotNull("either decision definition id or key must be set", decisionDefinitionId, decisionDefinitionKey); DecisionDefinition decisionDefinition = getDecisionDefinition(commandContext); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkEvaluateDecision(decisionDefinition); } return doEvaluateDecision(decisionDefinition, variables); }
@Override public DmnDecisionTableResult execute(CommandContext commandContext) { ensureOnlyOneNotNull("either decision definition id or key must be set", decisionDefinitionId, decisionDefinitionKey); DecisionDefinition decisionDefinition = getDecisionDefinition(commandContext); for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkEvaluateDecision(decisionDefinition); } return doEvaluateDecision(decisionDefinition, variables); }