String lookupName = getTaskFormName(task); templateString = filterXML(templateString, lang, task.getTaskData().getDeploymentId(), outputs); } else { templateString = attachSubForms(templateString, task.getTaskData().getDeploymentId());
if (SUB_FORM_TYPE.equals(fieldType) || MULTI_SUB_FORM_TYPE.equals(fieldType)) { String defaultSubForm = findPropertyValue(node, "defaultSubform"); if (defaultSubForm != null) { document = asString(doc); } catch (Exception ex) { logger.error("Error when attaching subform",
private void filterProperty(Node property, String lang, String value) { String label = getLabel(lang, value); property.getAttributes().getNamedItem(ATTR_VALUE).setNodeValue(label); }
String defaultSubForm = findPropertyValue(node, "defaultSubform"); if (defaultSubForm != null) { String currentNodeInputBinding = findPropertyValue(node, "inputBinding"); currentNodeInputBinding = currentNodeInputBinding.replaceAll("/", String currentNodeOutputBinding = findPropertyValue(node, "outputBinding"); currentNodeOutputBinding = currentNodeOutputBinding.replaceAll("/", String inputBindingSubForm = findPropertyValue(firstFieldNode, "inputBinding"); inputBindingSubForm = inputBindingSubForm.split("/")[0]; String outputBindingSubForm = findPropertyValue(firstFieldNode, "outputBinding"); outputBindingSubForm = outputBindingSubForm.split("/")[0]; String filtered = filterXML(subFormContent, lang, deploymentId, String defaultSubForm = findPropertyValue(node, "defaultSubform"); if (defaultSubForm != null) { String inputBinding = findPropertyValue(node,
if (templateString == null) { templateString = formManagerService.getFormByKey(process.getDeploymentId(), process.getId() + getFormSuffix()); templateString = filterXML(templateString, lang, process.getDeploymentId(), null); } else { templateString = attachSubForms(templateString, process.getDeploymentId());
@Test public void testAddSubForm() throws Exception { String allForms = formProvider.attachSubForms(createOrderFormContent, "test"); validateFormXML(allForms); }
@Before public void setup() throws IOException { formManagerService = new FormManagerServiceImpl(); createOrderFormContent = IOUtils.toString(this.getClass().getResourceAsStream("/test-forms/CreateOrder.form"), "UTF-8"); headerFormContent = IOUtils.toString(this.getClass().getResourceAsStream("/test-forms/PurchaseHeader.form"), "UTF-8"); orderLineFormContent = IOUtils.toString(this.getClass().getResourceAsStream("/test-forms/PurchaseLine.form"), "UTF-8"); formManagerService.registerForm("test", "CreateOrder.form", createOrderFormContent); formManagerService.registerForm("test", "PurchaseHeader.form", headerFormContent); formManagerService.registerForm("test", "PurchaseLine.form", orderLineFormContent); formProvider = new RemoteFormModellerFormProvider(); formProvider.configure(formManagerService); }
purchaseOrderOut); String filteredForm = formProvider.filterXML(createOrderFormContent, "en", "test",