Source:
<code>protected List<ProcessVariableSummary> getProcessVariables(QueryFilter filter) { Long processInstanceId = null; String processId = ""; String deploymentId = ""; String serverTemplateId = ""; if (filter.getParams() != null) { processInstanceId = Long.valueOf((String) filter.getParams().get("processInstanceId")); processId = (String) filter.getParams().get("processDefId"); deploymentId = (String) filter.getParams().get("deploymentId"); serverTemplateId = (String) filter.getParams().get("serverTemplateId"); } Map<String, String> properties = new HashMap<String, String>(); <START> if (isContainerAvailable(serverTemplateId, <END> deploymentId)) { ProcessServicesClient processClient = getClient(serverTemplateId, ProcessServicesClient.class); VariablesDefinition vars = processClient.getProcessVariableDefinitions(deploymentId, processId); properties.putAll(vars.getVariables()); } QueryServicesClient queryServicesClient = getClient(serverTemplateId, QueryServicesClient.class); List<VariableInstance> variables = queryServicesClient.findVariablesCurrentState(processInstanceId); Collection<ProcessVariableSummary> processVariables = VariableHelper.adaptCollection(variables, properties, processInstanceId, deploymentId, serverTemplateId); List<ProcessVariableSummary> processVariablesSums = new ArrayList<ProcessVariableSummary>(processVariables.size()); for (ProcessVariableSummary pv : processVariables) { if (filter.getParams().get("textSearch") == null || ((String) filter.getParams().get("textSearch")).isEmpty()) { processVariablesSums.add(pv); } else if (pv.getVariableId().toLowerCase().contains((String) filter.getParams().get("textSearch"))) { processVariablesSums.add(pv); } } return processVariablesSums; }</code><technical_language>@nmirasc I query service get variables definition. like: queryServicesClient.findProcessesById(processId).get(0).getProcessVariables() skip container check</technical_language>

Target:
protected List<ProcessVariableSummary> getProcessVariables(QueryFilter filter) { Long processInstanceId = null; String processId = ""; String deploymentId = ""; String serverTemplateId = ""; if (filter.getParams() != null) { processInstanceId = Long.valueOf((String) filter.getParams().get("processInstanceId")); processId = (String) filter.getParams().get("processDefId"); deploymentId = (String) filter.getParams().get("deploymentId"); serverTemplateId = (String) filter.getParams().get("serverTemplateId"); } Map<String, String> properties = new HashMap<String, String>(); QueryServicesClient queryServicesClient = getClient(serverTemplateId, QueryServicesClient.class); ProcessServicesClient processClient = getClient(serverTemplateId, ProcessServicesClient.class); try { VariablesDefinition vars = processClient.getProcessVariableDefinitions(deploymentId, processId); properties.putAll(vars.getVariables()); } catch (KieServicesHttpException kieException) { } List<VariableInstance> variables = queryServicesClient.findVariablesCurrentState(processInstanceId); Collection<ProcessVariableSummary> processVariables = VariableHelper.adaptCollection(variables, properties, processInstanceId, deploymentId, serverTemplateId); List<ProcessVariableSummary> processVariablesSums = new ArrayList<ProcessVariableSummary>(processVariables.size()); for (ProcessVariableSummary pv : processVariables) { if (filter.getParams().get("textSearch") == null || ((String) filter.getParams().get("textSearch")).isEmpty()) { processVariablesSums.add(pv); } else if (pv.getVariableId().toLowerCase().contains((String) filter.getParams().get("textSearch"))) { processVariablesSums.add(pv); } } return processVariablesSums; }