write a atl rule [message #468252] |
Tue, 04 August 2009 17:50 |
Eclipse User |
|
|
|
Originally posted by: valerio.cosentino.gmail.com
Hi,
i'm new in ATL
i wrote two input metamodels (BPMN and UML2), and one simple output
metamodel:
Gambuse
+ Classifier
Name (String)
Type (String)
+ Disparity
Name (String)
c1 (Classifier)
c2 (Classifier)
+ Uguality
Name (String)
c1 (Classifier)
c2 (Classifier)
i'd like write a rule that do: if an activity on BPMN has the same name of
an namedElement on UML2, adds the concat names, and references to two
classifiers on Iguality EClass of my output model otherwise adds the same
things to Disparity EClass:
rule FillIguality (s1 : BPMN!Activity, s2 : UML2!NamedElement) {
to
-- if s1.name = s2.name then
t : Gambuse!Iguality (
name <- s1.name+' '+s2.name,
c1 <- s1,
c2 <- s2
)
-- else
t : Gambuse!Disparity (
name <- s1.name+' '+s2.name,
c1 <- s1,
c2 <- s2
)
--endif
}
someone can help me?
thank you!
|
|
|
Powered by
FUDForum. Page generated in 0.03559 seconds