[EMFTVM] Multi-valued field [message #1800321] |
Mon, 24 December 2018 14:45 |
jo ber Messages: 94 Registered: August 2018 |
Member |
|
|
Hi
When running the following rule with EMFTVM:
...
bestTradingVenues <- x -> collect(e | e.y -> collect(f | thisModule.BestTradingCurrency(f,e))),
...
the first line in the 'to' clause causes the following exception:
Exception in thread "main" org.eclipse.m2m.atl.emftvm.util.VMException: java.lang.IllegalArgumentException: Cannot add/remove values of type Sequence to/from multi-valued field
at rule 2FinancialInstrument@applier#7(./transformation/x2y.atl#[35:4-35:113])
Local variables: [__trace__: TRACE!TraceLink = 78e22d35:TRACE!TraceLink, = acf859d:]
at static EMFTVM!ExecEnv::main() : Object(./transformation/.atl)
Local variables: []
at org.eclipse.m2m.atl.emftvm.impl.CodeBlockImpl.internalExecute(CodeBlockImpl.java:987)
at org.eclipse.m2m.atl.emftvm.impl.CodeBlockImpl.execute(CodeBlockImpl.java:726)
at org.eclipse.m2m.atl.emftvm.impl.RuleImpl$WithApplierWithoutPostApplyCbState.applyFor(RuleImpl.java:1276)
at org.eclipse.m2m.atl.emftvm.impl.RuleImpl$IsNotAbstractState.apply(RuleImpl.java:1052)
at org.eclipse.m2m.atl.emftvm.impl.RuleImpl.apply(RuleImpl.java:2284)
at org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.matchAllSingle(ExecEnvImpl.java:2262)
at org.eclipse.m2m.atl.emftvm.impl.ExecEnvImpl.run(ExecEnvImpl.java:2109)
at run.transformation.emftvm.cdo.EMFTVMEngineOnCDO.launch(EMFTVMEngineOnCDO.java:72)
at run.transformation.emftvm.cdo.EMFTVMEngineOnCDO.start(EMFTVMEngineOnCDO.java:112)
at run.transformation.emftvm.cdo.Transform.<init>(Transform.java:24)
at run.transformation.emftvm.cdo.Transform.main(Transform.java:13)
Caused by: java.lang.IllegalArgumentException: Cannot add/remove values of type Sequence to/from multi-valued field
at org.eclipse.m2m.atl.emftvm.util.EMFTVMUtil.checkValueTypeIsEObject(EMFTVMUtil.java:886)
at org.eclipse.m2m.atl.emftvm.util.EMFTVMUtil.addMany(EMFTVMUtil.java:843)
at org.eclipse.m2m.atl.emftvm.util.EMFTVMUtil.setMany(EMFTVMUtil.java:785)
at org.eclipse.m2m.atl.emftvm.util.EMFTVMUtil.set(EMFTVMUtil.java:631)
at org.eclipse.m2m.atl.emftvm.impl.CodeBlockImpl.set(CodeBlockImpl.java:1691)
at org.eclipse.m2m.atl.emftvm.impl.CodeBlockImpl.internalExecute(CodeBlockImpl.java:777)
... 10 more
When running the same rule in ATL (standard), no issue is raised. It looks like EMTFVM can process on mapping on collection of collection. Is there a way to translate it in a way compatible with EMFTVM?
Thank you.
[Updated on: Mon, 24 December 2018 20:21] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03889 seconds