[ATL] problem when using allInstancesFrom [message #499471] |
Sun, 22 November 2009 21:27 |
Rodo Messages: 3 Registered: November 2009 |
Junior Member |
|
|
Hello everybody,
i want to apply the following rule ( see bottom) to transform a Family!Member to a Person!Male. A Person!Male have a fullName and Opa, an Opa is also a Person!Male and is the only element in IN1. I am trying to get it with MMPersons!Male.allInstancesFrom('IN1') command but it doesn't work could anyone tell me please what i am doing wrong?
module cloneTwoF2P;
create OUT : MMPersons from IN : MMFamilies, IN1 : MMPersons;
...
rule M2MannKind{
from s: MMFamilies!Member(s.isKindUndMale())
to t: MMPersons!Male(fullName <- s.fisrtName + ' ' + s.refImmediateComposite().lastName,
Opa <- MMPersons!Male.allInstancesFrom('IN1')-> any(e | e.oclIsTypeOf(MMPersons!Person))
)
}
[Updated on: Sun, 22 November 2009 21:29] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03517 seconds