Source:
public String getFormDisplayTask(String containerId, long taskId, String lang, boolean filterContent, String formType) { Task task = userTaskService.execute(containerId, new GetUserTaskCommand(registry.getIdentityProvider().getName(), taskId)); if (task == null) { throw new IllegalStateException("No task with id " + taskId + " found"); } String name = task.getName(); ProcessDefinition processDesc = dataService.getProcessesByDeploymentIdProcessId(containerId, task.getTaskData().getProcessId()); Map<String, Object> renderContext = new HashMap<>(); renderContext.put("filterForm", filterContent); Map<String, Object> input = userTaskService.getTaskInputContentByTaskId(containerId, taskId); renderContext.put("inputs", input); for (Map.Entry<String, Object> inputVar : input.entrySet()) { renderContext.put(inputVar.getKey(), inputVar.getValue()); } Map<String, String> outputDef = definitionService.getTaskOutputMappings(containerId, task.getTaskData().getProcessId(), task.getName()); Map<String, Object> output = userTaskService.getTaskOutputContentByTaskId(containerId, taskId); renderContext.put("outputs", output); for (Map.Entry<String, Object> outputVar : output.entrySet()) { renderContext.put(outputVar.getKey(), outputVar.getValue()); } outputDef.forEach((k, v) -> { if (!renderContext.containsKey(k)) { renderContext.put(k, ""); } }); renderContext.put("lang", lang); renderContext.put("task", task); for (UIFormProvider provider : providers) { if (!FormType.ANY.getName().equals(formType) && !provider.getType().equals(formType)) { logger.debug("Provider does not support form type", provider, formType); continue; } String template = provider.render(name, task, processDesc, renderContext); if (!StringUtils.isEmpty(template)) { return template; } } logger.warn("Unable to find form to render for task '{}' on process '{}'", name, processDesc.getName()); throw new IllegalStateException("No form for task with id " + taskId + " found"); }

Target:
public String getFormDisplayTask(String containerId, long taskId, String lang, boolean filterContent, String formType) { containerId = registry.getContainerId(containerId, new ByTaskIdContainerLocator(taskId)); Task task = userTaskService.execute(containerId, new GetUserTaskCommand(registry.getIdentityProvider().getName(), taskId)); if (task == null) { throw new IllegalStateException("No task with id " + taskId + " found"); } String name = task.getName(); ProcessDefinition processDesc = dataService.getProcessesByDeploymentIdProcessId(containerId, task.getTaskData().getProcessId()); Map<String, Object> renderContext = new HashMap<>(); renderContext.put("filterForm", filterContent); Map<String, Object> input = userTaskService.getTaskInputContentByTaskId(containerId, taskId); renderContext.put("inputs", input); for (Map.Entry<String, Object> inputVar : input.entrySet()) { renderContext.put(inputVar.getKey(), inputVar.getValue()); } Map<String, String> outputDef = definitionService.getTaskOutputMappings(containerId, task.getTaskData().getProcessId(), task.getName()); Map<String, Object> output = userTaskService.getTaskOutputContentByTaskId(containerId, taskId); renderContext.put("outputs", output); for (Map.Entry<String, Object> outputVar : output.entrySet()) { renderContext.put(outputVar.getKey(), outputVar.getValue()); } outputDef.forEach((k, v) -> { if (!renderContext.containsKey(k)) { renderContext.put(k, ""); } }); renderContext.put("lang", lang); renderContext.put("task", task); for (UIFormProvider provider : providers) { if (!FormType.ANY.getName().equals(formType) && !provider.getType().equals(formType)) { logger.debug("Provider does not support form type", provider, formType); continue; } String template = provider.render(name, task, processDesc, renderContext); if (!StringUtils.isEmpty(template)) { return template; } } logger.warn("Unable to find form to render for task '{}' on process '{}'", name, processDesc.getName()); throw new IllegalStateException("No form for task with id " + taskId + " found"); }