Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83469

Excel Importer Schema - Not Able to Import a Template Document

$
0
0
Hello everyone,  I am new using the ExcelImporter. I have created an import schema to import some rule definitions for my project. I noticed, I am not able to import the data. I assume it has to do with the enumerations, I am trying to map. This is the Data model I have used. I am importing the MlfbElectricConsumption, which also has MlfbElement (Property: Name) information in it, so I have mapped it as a Reference ( this was the only way possible). You can check the xml schema below for the mapping. When I perform the import, I get “Import is Finished. 0 records imported”.  The following is the error message, I get in the stack trace ---------------------------------------------------------------------------------------------------------------------------------------------------------com.mendix.systemwideinterfaces.core.DataValidationRuntimeException: Calculation Type is required     at com.mendix.basis.objectmanagement.DataValidationUtil.validateObjectMember(DataValidationUtil.java:64)     at com.mendix.basis.objectmanagement.MendixObjectMemberImpl.checkBeforeSetValue(MendixObjectMemberImpl.java:253)     at com.mendix.basis.objectmanagement.MendixObjectMemberImpl.setValue(MendixObjectMemberImpl.java:241)     at com.mendix.basis.objectmanagement.member.MendixEnumImpl.setValue(MendixEnumImpl.java:67)     at com.mendix.basis.objectmanagement.member.MendixEnumImpl.setValue(MendixEnumImpl.java:18)     at com.mendix.basis.objectmanagement.MendixObjectMemberImpl.parseValueFromString(MendixObjectMemberImpl.java:272)     at com.mendix.basis.objectmanagement.MendixObjectImpl.setValue(MendixObjectImpl.java:193)     at com.mendix.basis.objectmanagement.MendixObjectImpl.setValue(MendixObjectImpl.java:185)     at replication.MetaInfoProcessor.updateMemberAndSetState(MetaInfoProcessor.java:665)     at replication.MetaInfoProcessor.changeMembersForBatch(MetaInfoProcessor.java:487)     at replication.MetaInfoProcessor.storeChangedObjects(MetaInfoProcessor.java:235)     at replication.MetaInfoProcessor.startProcessing(MetaInfoProcessor.java:66)     at replication.MetaInfo.startProcessingObjects(MetaInfo.java:743)     at replication.MetaInfo.finished(MetaInfo.java:768)     at excelimporter.reader.readers.ExcelRowProcessor.finish(ExcelRowProcessor.java:169)     at excelimporter.reader.readers.ExcelXLSXDataReader.readData(ExcelXLSXDataReader.java:48)     at excelimporter.reader.readers.ExcelReader.importData(ExcelReader.java:451)     at excelimporter.reader.ExcelImporter.startImport(ExcelImporter.java:120)     at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:54)     at excelimporter.actions.StartImportByTemplate.executeAction(StartImportByTemplate.java:25)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54)     at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:147)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:26)     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:152)     at com.mendix.basis.actionmanagement.UserActionCallBuilderImpl.execute(UserActionCallBuilderImpl.scala:30)     at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:56)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:50)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:217)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:167)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:49)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54)     at com.mendix.basis.actionmanagement.DefaultActionMonitor$.$anonfun$run$1(CustomMonitoredAction.scala:18)     at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:26)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25)     at com.mendix.basis.actionmanagement.CustomMonitoredAction.monitor(CustomMonitoredAction.scala:22)     at com.mendix.basis.actionmanagement.DefaultActionMonitor$.run(CustomMonitoredAction.scala:18)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.runMonitoredAction(CoreActionHandlerImpl.scala:60)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:47)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:54)     at com.mendix.basis.actionmanagement.ActionManager.$anonfun$execute$1(ActionManager.scala:118)     at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)     at scala.util.Success.$anonfun$map$1(Try.scala:255)     at scala.util.Success.map(Try.scala:213)     at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)     at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)     at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)     at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)     at java.base/java.lang.Thread.run(Thread.java:834) --------------------------------------------------------------------------------------------------------------------------------------------------------         My Schema definition used for the Import is shown below here in the xml: 16Electrical Consumption RuleImports the Rules for the Electrical Consumption112VALIDSynchronizeObjects0Calculation typeAttributeNoNoKeyVALID
Attribute: CalculationType, type: Enum
NoCalculationTypeCellValueMlfbElectricConsumptionMainCalculationTypeMain.MlfbElectricConsumption / CalculationType
1MLFB elementReferenceNoYesMainAndAssociatedObjectVALID
Reference: Main.MlfbElectricConsumption_MlfbElement/Main.MlfbElement/Name, type: String
NoNameMain.MlfbElectricConsumption_MlfbElementMain.MlfbElementCellValueMlfbElementMainMlfbElectricConsumptionMainNameMain.MlfbElement / NameMainMlfbElectricConsumption_MlfbElement
2Base MLFB ComponentAttributeYesYesOnlyMainObjectVALID
Attribute: BaseMLFBComponent, type: String
NoBaseMLFBComponentCellValueMlfbElectricConsumptionMainBaseMLFBComponentMain.MlfbElectricConsumption / BaseMLFBComponent
3Order codeAttributeYesYesOnlyMainObjectVALID
Attribute: OrderCode, type: String
NoOrderCodeCellValueMlfbElectricConsumptionMainOrderCodeMain.MlfbElectricConsumption / OrderCode
4Electric consumptionAttributeNoNoKeyVALID
Attribute: ElectricConsumption, type: Decimal
NoElectricConsumptionCellValueMlfbElectricConsumptionMainElectricConsumptionMain.MlfbElectricConsumption / ElectricConsumption
FindCreateOverwritefalsetruetrueMainMlfbElectricConsumption_MlfbElementAllStatisticstruetruetrueNothingfalseMlfbElectricConsumptionMain
    Can anyone please let me know what is the problem. If there is any workaround for this ?

Viewing all articles
Browse latest Browse all 83469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>