| EMF operation invocation in an ATL module [message #1075395] |
Mon, 29 July 2013 06:59  |
Kosala Yapa Messages: 151 Registered: September 2010 |
Senior Member |
|
|
Hi there,
rule rule_getDevice{
from
a: source!DeviceItem
to
p:target!Device(
name <- a.Name,
s7DeviceReference<-a.DeviceReference,
isSelectedWithinStep7 <-a.stringToBool(a.IsSelected)
)
}
stringToBool() defined in the source EMF meta-model. I set the Operation Reflection feature of the gen model to True.
I get the following error, When I run this transformation using ATL Run configuration,
org.eclipse.m2m.atl.engine.emfvm.VMException: Operation not found: IN!<unnamed>.stringToBool(java.lang.String)
Any help is appreciated.
Cheers,
Kosala
|
|
|
| Re: EMF operation invocation in an ATL module [message #1075499 is a reply to message #1075395] |
Mon, 29 July 2013 10:38   |
Hugo Bruneliere Messages: 560 Registered: July 2009 |
Senior Member |
|
|
Hello,
Invoking such Java-implemented operations is generally not a recommended practice in ATL.
However, the refInvokeOperation operation allows to do so when really needed.
Best regards,
------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
|
|
|
|
| Re: EMF operation invocation in an ATL module [message #1075506 is a reply to message #1075504] |
Mon, 29 July 2013 10:51  |
Hugo Bruneliere Messages: 560 Registered: July 2009 |
Senior Member |
|
|
As explained in the manual, something like: a.refInvokeOperation('stringToBool',Sequence{a.IsSelected})
Best regards,
------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
|
|
|
Powered by
FUDForum. Page generated in 0.01766 seconds