Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » different condition levels in filter of the rule
different condition levels in filter of the rule [message #1759001] Wed, 05 April 2017 07:35 Go to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Hi,

How can I select if an element oclIsTypeOf(...)? when I use asSequence(),... it has an error.
To Clarify, In the below code I want to transform "AssignmentStatement" which its lhs.oclIsTypeOf(MM_ETL!PropertyCallExpression) and then set another conditions that is related to "lhs.oclIsTypeOf(MM_ETL!PropertyCallExpression)", How can I do that?

from 
		b : MM_ETL!AssignmentStatement
		  ( OUT_MM!EClass.allInstancesFrom('IN3') -> ...  ->select(t|t.name.name=[color=red]b.lhs.target.name[/color])->....


if I don't put the condition that I explain above, the selected code has an error.


Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: different condition levels in filter of the rule [message #1759131 is a reply to message #1759001] Thu, 06 April 2017 17:41 Go to previous messageGo to next message
louis andia. is currently offline louis andia.Friend
Messages: 47
Registered: November 2016
Member
Hi,

Maybe you should check before if lhs is defined nor is type of what you want?

from 
		b : MM_ETL!AssignmentStatement
		  (  if b.lhs.oclIsTypeOf(MM_ETL!PropertyCallExpression) 
then OUT_MM!EClass.allInstancesFrom('IN3') -> ...  ->select(t|t.name.name=[color=red]b.lhs.target.name[/color])->....
else false endif


or if the problem is in your ocl expression, add some select (like ->select(t|t.oclIsTypeOf(MM_ETL!PropertyCallExpression)) ) before your select where you have a truble.
Re: different condition levels in filter of the rule [message #1759138 is a reply to message #1759131] Thu, 06 April 2017 19:56 Go to previous message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Many thanks for your kind help

Member of MDSE Research Group
http://mdse.ui.ac.ir
Previous Topic:code optimization
Next Topic:customized output file
Goto Forum:
  


Current Time: Tue Apr 23 07:52:36 GMT 2024

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

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

Back to the top