Problem: No resource found, unable to extract.. [message #468251] |
Tue, 04 August 2009 17:40 |
Eclipse User |
|
|
|
Originally posted by: valerio.cosentino.gmail.com
Hi,
i have 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 wrote an atl file modelmatching.atl
module modelmatching;
create OUT : Gambuse from IN1 : BPMN, IN2 : UML2;
helper context BPMN!Activity def: isEmpty() : Boolean =
if self.name.oclIsUndefined() then
true
else
false
endif;
helper context UML2!NamedElement def: isEmpty() : Boolean =
if self.name.oclIsUndefined() then
true
else
false
endif;
rule BPMNtoGambuse {
from
s : BPMN!Activity (not s.isEmpty())
to
t : Gambuse!Classifier (
name <- s.name.toLower(),
type <- 'BPMN'
)
}
rule UML2toGambuse {
from
s : UML2!NamedElement (not s.isEmpty())
to
t : Gambuse!Classifier (
name <- s.name.toLower(),
type <- 'UML2'
)
}
rule FillIguality (s1 : BPMN!Activity, s2 : UML2!NamedElement) {
to
t : Gambuse!Iguality (
name <- s1.name+' '+s2.name,
c1 <- s1,
c2 <- s2
)
}
the rules BPMNtoGambuse and UML2toGambuse work fine and write in my output
file modelmatching.ecore:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns="Gambuse">
<Classifier name="request catolog " type="BPMN"/>
<Classifier name="start event" type="BPMN"/>
<Classifier name="select products" type="BPMN"/>
<Classifier name="received po ack" type="BPMN"/>
<Classifier name="products order " type="BPMN"/>
<Classifier name="select payment method" type="BPMN"/>
...
but the last rule seem does not work, nothing appears in the output file
and atl generate an error:
No Resource found, unable to extract to file:/C:\Documents and
Settings\...\ModelMatching\modelmatching.ecore
|
|
|
Powered by
FUDForum. Page generated in 0.02720 seconds