| using resolveTemp y the source patterns [message #1005982] |
Tue, 29 January 2013 08:17  |
yrreb yrreb Messages: 3 Registered: January 2013 |
Junior Member |
|
|
Hello,
I am trying of using the 'resolveTemp' function in a source pattern of an ATL rule in order to filter if a target element has already been created. If it hasn't this rule is applied and it creates, between others, the target element. However, when i use the 'resolveTemp' function in the source pattern I get an error indicating that this function is prohibited in the source patterns.
Because of this, I created a helper using the 'resolveTemp' function. This way I don't get the error, but it doesn't work, if a target element has alredy been created I do not get it. Someone know how could I know in a source parttern if a target pattern has been created.
Thank you very much.
|
|
|
| Re: using resolveTemp y the source patterns [message #1006067 is a reply to message #1005982] |
Tue, 29 January 2013 12:22   |
Hugo Bruneliere Messages: 467 Registered: July 2009 |
Senior Member |
|
|
Hello,
In ATL, the resolveTemp is provided in order to access to output model elements created by another rule. However (cf. ATL Reference Documentation):
- Most of the times, the use of this method is not required as ATL is automatically doing the resolution for you from the referenced input model elements;
- Calling this method makes only sense in output patterns, as you have no reason to access to newly created model elements in input patterns (which only consist in navigating input model elements)?
I hope this helps.
Hugo
------------------------------------------
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.01678 seconds