formFields.add(formFieldHandler.createFormField(execution));
}
}
public void submitFormVariables(VariableMap properties, VariableScope variableScope) {
VariableMap propertiesCopy = new VariableMapImpl(properties);
// support legacy form properties
for (FormPropertyHandler formPropertyHandler: formPropertyHandlers) {
// submitFormProperty will remove all the keys which it takes care of
formPropertyHandler.submitFormProperty(variableScope, propertiesCopy);
}
// support form data:
for (FormFieldHandler formFieldHandler : formFieldHandlers) {
formFieldHandler.handleSubmit(variableScope, propertiesCopy, properties);
}
// any variables passed in which are not handled by form-fields or form
// properties are added to the process as variables
for (String propertyId: propertiesCopy.keySet()) {
variableScope.setVariable(propertyId, propertiesCopy.getValueTyped(propertyId));
}
fireFormPropertyHistoryEvents(properties, variableScope);
}