Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » write a atl rule
write a atl rule [message #468252] Tue, 04 August 2009 17:50
Eclipse UserFriend
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!
Previous Topic:Problem: No resource found, unable to extract..
Next Topic:[QVTO] Involve Java code?
Goto Forum:
  


Current Time: Mon Jan 20 18:35:16 GMT 2025

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

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

Back to the top