Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » EMF operation invocation in an ATL module
EMF operation invocation in an ATL module [message #1075395] Mon, 29 July 2013 10:59 Go to next message
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
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 14:38 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
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, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: EMF operation invocation in an ATL module [message #1075504 is a reply to message #1075499] Mon, 29 July 2013 14:48 Go to previous messageGo to next message
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
Registered: September 2010
Senior Member
Hi Hugo,

Thanks. Do you have any clue how to use refInvokeOperation in the above example?

isSelectedWithinStep7 <-a.stringToBool(a.IsSelected)

Cheers,

[Updated on: Mon, 29 July 2013 14:50]

Report message to a moderator

Re: EMF operation invocation in an ATL module [message #1075506 is a reply to message #1075504] Mon, 29 July 2013 14:51 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
As explained in the manual, something like: a.refInvokeOperation('stringToBool',Sequence{a.IsSelected})

Best regards,


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:Incremental ATL
Next Topic:problem in helper
Goto Forum:
  


Current Time: Wed Apr 24 23:36:35 GMT 2024

Powered by FUDForum. Page generated in 0.03447 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top