qbeEngineInstance.setAnalysisMetadata( getAnalysisMetadata() );
// initializes form state, if not already initialized (starting a new form definition)
FormState formState = qbeEngineInstance.getFormState();
if (formState == null) {
logger.debug("Initializing a new form state object...");
formState = new FormState();
formState.setConf(new JSONObject());
qbeEngineInstance.setFormState(formState);
}
//Integer subObjectId = getAttributeAsInteger("subobjectId");
//get the form values saved (if the user has loaded a subobject)
analysisFormState = new SmartFilterAnalysisState();
analysisFormState.load( getAnalysisStateRowData() );
formState.setFormStateValues(analysisFormState.getFormValues());
//save the map id-->field name
formState.setIdNameMap();
qbeEngineInstance.getEnv().put("TEMPLATE", getTemplateAsSourceBean());
String docId = this.getAttributeAsString("formDocumentId");
if(docId != null) qbeEngineInstance.getEnv().put("DOCUMENT", docId);
else {