saveVariablesCommand.setVariables(variables);
commandExecutor.execute(new SaveVariablesCmd(saveVariablesCommand));
}
public Object getVariable(String taskId, String variableName) {
QueryVariablesCommand queryVariablesCommand = new QueryVariablesCommand();
queryVariablesCommand.setTaskInstanceId(taskId);
List<String> variableNames = new ArrayList<String>();
variableNames.add(variableName);
queryVariablesCommand.setVariableNames(variableNames);
Map<String, Object> map = commandExecutor.execute(new QueryVariablesCmd<Map<String, Object>>(queryVariablesCommand));
return map.get(variableName);
}