public Map getMappedResult(ProcessInstance instance) throws Exception{
Map mappedResult = new HashMap();
OfficeDocumentInstance officeDocInst = instance==null ? (OfficeDocumentInstance)(getVariableForOfficeDocumentInstance().getDefaultValue()) : (OfficeDocumentInstance)(getVariableForOfficeDocumentInstance().get(instance, ""));
/* InputStream officeDocDefXMLInputStream = ProcessDefinitionFactory.getInstance(instance.getProcessTransactionContext()).getResourceStream(officeDocInst.getDocumentDefId());
OfficeDocumentDefinition officeDocDef = (OfficeDocumentDefinition) GlobalContext.deserialize(officeDocDefXMLInputStream, OfficeDocumentDefinition.class);
List fieldList = officeDocDef.getFieldList();
final Map fieldListHT = new HashMap();
new ForLoop(){
public void logic(Object target) {
FieldDescriptor fd = (FieldDescriptor)target;
fieldListHT.put(fd.getName(), fd);
}
}.run(fieldList);*/
Map valueMap = new HashMap();
if(officeDocInst==null) return valueMap;
valueMap = officeDocInst.getValueMap();
if(valueMap==null && officeDocInst.getFilePath()!=null){
officeDocInst.loadValueMap();
mappedResult = officeDocInst.getValueMap();
}
MappingContext mappingContext = getMappingContext();
ParameterContext[] params = mappingContext.getMappingElements();//getVariableBindings();