public void applyFormInstanceData(FormInstance formInstance, ScopeInstanceImpl scopeInstance) { if (formInstance != null && formInstance.getFields() != null) { for (FormInstanceField field : formInstance.getFields()) { Object value = field.getValue(); FormFieldBinding formFieldBinding = formFieldBindings.get(field.getId()); if (isWritable(formFieldBinding)) { String variableId = formFieldBinding.binding.expression.variableId; scopeInstance.setVariableValue(variableId, value); } } } }
public void deserializeFormInstance(FormInstance formInstance) { if (formInstance == null) { return; } if (formInstance.getFields() != null) { for (FormInstanceField field : formInstance.getFields()) { String fieldId = field.getId(); FormFieldBinding formFieldBinding = formFieldBindings.get(fieldId); if (formFieldBinding != null) { formFieldBinding.deserializeFormField(field); } else { log.debug("Ignoring undefined form field '" + fieldId + "'"); } } } }