protected HistoricVariableInstance getHistoricVarInstanceValue(HistoryService historyService, String processInstanceId, String parameter) { return historyService.createHistoricVariableInstanceQuery() .processInstanceId(processInstanceId) .variableName(parameter) .singleResult(); }
public HistoricVariableInstance getHistoricVarInstanceValue(HistoryService historyService, String processInstanceId, String parameter) { return historyService.createHistoricVariableInstanceQuery() .processInstanceId(processInstanceId) .variableName(parameter) .singleResult(); } }
public HistoricVariableInstance getHistoricVarInstanceValue(HistoryService historyService, String processInstanceId, String parameter) { return historyService.createHistoricVariableInstanceQuery() .processInstanceId(processInstanceId) .variableName(parameter) .singleResult(); } }
protected HistoricVariableInstance getHistoricVarInstanceValue(HistoryService historyService, String processInstanceId, String parameter) { return historyService.createHistoricVariableInstanceQuery() .processInstanceId(processInstanceId) .variableName(parameter) .singleResult(); }
private HistoricVariableInstance getAbortOnErrorVariable(CommandContext commandContext, String processId) { return getHistoryService(commandContext).createHistoricVariableInstanceQuery() .processInstanceId(processId) .variableName(Constants.PARAM_ABORT_ON_ERROR) .singleResult(); }
private HistoricVariableInstance getAbortOnErrorVariable(CommandContext commandContext, String processId) { return getHistoryService(commandContext).createHistoricVariableInstanceQuery() .processInstanceId(processId) .variableName(Constants.PARAM_ABORT_ON_ERROR) .singleResult(); }
public HistoricVariableInstance getHistoricVariableInstance(String processInstanceId, String variableName) { return processEngine.getHistoryService() .createHistoricVariableInstanceQuery() .processInstanceId(processInstanceId) .variableName(variableName) .singleResult(); }
private List<HistoricVariableInstance> retrieveVariablesByCorrelationId(String correlationId) { return processEngine.getHistoryService() .createHistoricVariableInstanceQuery() .variableValueEquals(Constants.CORRELATION_ID, correlationId) .orderByProcessInstanceId() .asc() .list(); }
@Override public Object getVariable(String variableName) { HistoricVariableInstance result = Context.getProcessEngineConfiguration() .getHistoryService() .createHistoricVariableInstanceQuery() .processInstanceId(getProcessInstanceId()) .variableName(variableName) .singleResult(); if (result != null) { return result.getValue(); } return result; }
@Override public Object getVariable(String variableName) { HistoricVariableInstance result = Context.getProcessEngineConfiguration() .getHistoryService() .createHistoricVariableInstanceQuery() .processInstanceId(getProcessInstanceId()) .variableName(variableName) .singleResult(); if (result != null) { return result.getValue(); } return result; }
private String getVariableFromHistoryService(FlowableEngineEvent event, String variableName) { HistoricVariableInstance historicVariableInstance = Context.getProcessEngineConfiguration() .getHistoryService() .createHistoricVariableInstanceQuery() .executionId(event.getExecutionId()) .variableName(variableName) .singleResult(); if (historicVariableInstance == null) { return null; } return (String) historicVariableInstance.getValue(); } }
private String getVariableFromHistoryService(FlowableEngineEvent event, String variableName) { HistoricVariableInstance historicVariableInstance = Context.getProcessEngineConfiguration() .getHistoryService() .createHistoricVariableInstanceQuery() .executionId(event.getExecutionId()) .variableName(variableName) .singleResult(); if (historicVariableInstance == null) { return null; } return (String) historicVariableInstance.getValue(); } }
@Override public Object execute(CommandContext commandContext) { Object result = delegate.execute(commandContext); String processInstanceId = getProcessId(commandContext); HistoricVariableInstance corelationId = getHistoryService(commandContext).createHistoricVariableInstanceQuery() .processInstanceId(processInstanceId) .variableName(Constants.VAR_CORRELATION_ID) .singleResult(); if (!processInstanceId.equals(corelationId.getValue())) { return result; } HistoricVariableInstance abortOnErrorVariable = getAbortOnErrorVariable(commandContext, processInstanceId); if (shouldAbortProcess(abortOnErrorVariable)) { abortProcess(commandContext, processInstanceId); } return result; }
@Override public Object execute(CommandContext commandContext) { Object result = delegate.execute(commandContext); String processInstanceId = getProcessId(commandContext); HistoricVariableInstance corelationId = getHistoryService(commandContext).createHistoricVariableInstanceQuery() .processInstanceId(processInstanceId) .variableName(Constants.VAR_CORRELATION_ID) .singleResult(); if (!processInstanceId.equals(corelationId.getValue())) { return result; } HistoricVariableInstance abortOnErrorVariable = getAbortOnErrorVariable(commandContext, processInstanceId); if (shouldAbortProcess(abortOnErrorVariable)) { abortProcess(commandContext, processInstanceId); } return result; }
if (!ignoreVariables && task.getProcessInstanceId() != null) { List<HistoricVariableInstance> variableInstances = processEngineConfiguration.getHistoryService() .createHistoricVariableInstanceQuery() .processInstanceId(task.getProcessInstanceId()) .list();