@Override protected List<VariableInstanceEntity> getSpecificVariables(Collection<String> variableNames) { return CommandContextUtil.getVariableService().findVariableInstancesByScopeIdAndScopeTypeAndNames(id, ScopeTypes.CMMN, variableNames); }
CommandContextUtil.getVariableService(commandContext).deleteVariablesByTaskId(task.getId()); CommandContextUtil.getVariableService(commandContext).deleteVariablesByTaskId(task.getId());
@Override protected List<VariableInstanceEntity> getSpecificVariables(Collection<String> variableNames) { return CommandContextUtil.getVariableService().findVariableInstancesBySubScopeIdAndScopeTypeAndNames(id, ScopeTypes.CMMN, variableNames); }
@Override protected Collection<VariableInstanceEntity> loadVariableInstances() { return CommandContextUtil.getVariableService().findVariableInstanceBySubScopeIdAndScopeType(id, ScopeTypes.CMMN); }
@Override protected Collection<VariableInstanceEntity> loadVariableInstances() { return CommandContextUtil.getVariableService().findVariableInstanceByScopeIdAndScopeType(id, ScopeTypes.CMMN); }
@Override protected VariableInstanceEntity getSpecificVariable(String variableName) { return CommandContextUtil.getVariableService().findVariableInstanceByScopeIdAndScopeTypeAndName(id, ScopeTypes.CMMN, variableName); }
@Override protected VariableInstanceEntity getSpecificVariable(String variableName) { return CommandContextUtil.getVariableService().findVariableInstanceBySubScopeIdAndScopeTypeAndName(id, ScopeTypes.CMMN, variableName); }
public static VariableService getVariableService() { return getVariableService(getCommandContext()); }
@Override public Map<String, Object> execute(CommandContext commandContext) { if (planItemInstanceId == null) { throw new FlowableIllegalArgumentException("planItemInstanceId is null"); } List<VariableInstanceEntity> variableInstanceEntities = CommandContextUtil.getVariableService(commandContext) .findVariableInstanceBySubScopeIdAndScopeType(planItemInstanceId, ScopeTypes.CMMN); Map<String, Object> variables = new HashMap<>(variableInstanceEntities.size()); for (VariableInstanceEntity variableInstanceEntity : variableInstanceEntities) { variables.put(variableInstanceEntity.getName(), variableInstanceEntity.getValue()); } return variables; }
@Override public Map<String, Object> execute(CommandContext commandContext) { if (caseInstanceId == null) { throw new FlowableIllegalArgumentException("caseInstanceId is null"); } List<VariableInstanceEntity> variableInstanceEntities = CommandContextUtil.getVariableService(commandContext) .findVariableInstanceByScopeIdAndScopeType(caseInstanceId, ScopeTypes.CMMN); Map<String, Object> variables = new HashMap<>(variableInstanceEntities.size()); for (VariableInstanceEntity variableInstanceEntity : variableInstanceEntities) { variables.put(variableInstanceEntity.getName(), variableInstanceEntity.getValue()); } return variables; }
@Override public List<VariableInstance> execute(CommandContext commandContext) { if (taskIds == null) { throw new FlowableIllegalArgumentException("taskIds is null"); } if (taskIds.isEmpty()) { throw new FlowableIllegalArgumentException("Set of taskIds is empty"); } List<VariableInstance> instances = new ArrayList<>(); List<VariableInstanceEntity> entities = CommandContextUtil.getVariableService().findVariableInstancesByTaskIds(taskIds); for (VariableInstanceEntity entity : entities) { entity.getValue(); instances.add(entity); } return instances; }
@Override public Object execute(CommandContext commandContext) { if (caseInstanceId == null) { throw new FlowableIllegalArgumentException("caseInstanceId is null"); } VariableInstanceEntity variableInstanceEntity = CommandContextUtil.getVariableService(commandContext) .findVariableInstanceByScopeIdAndScopeTypeAndName(caseInstanceId, ScopeTypes.CMMN, variableName); if (variableInstanceEntity != null) { return variableInstanceEntity.getValue(); } return null; }
@Override public Object execute(CommandContext commandContext) { if (planItemInstanceId == null) { throw new FlowableIllegalArgumentException("planItemInstanceId is null"); } VariableInstanceEntity variableInstanceEntity = CommandContextUtil.getVariableService(commandContext) .findVariableInstanceBySubScopeIdAndScopeTypeAndName(planItemInstanceId, ScopeTypes.CMMN, variableName); if (variableInstanceEntity != null) { return variableInstanceEntity.getValue(); } return null; }