Conditional model element creation in ATL [message #18608] |
Tue, 27 February 2007 13:20 |
Eclipse User |
|
|
|
Originally posted by: roland.ukor.cs.man.ac.uk
Hi All
I am trying to implement an ATL based transformation from an EPC metamodel
to YAWL metamodel and wanted to find out if a construct like this is
possible with ATL or such a construct is desirable.
...
rule RuleName
from
source : epc!Element(very long condition)
to
dest1 : yawl!Net
dest2 : yawl!XXXX [This should only be created if condition evaluates to
true]
dest3 : yawl!YYYY
...
My current goal is to effect the following transformation rule:
If No of StartEvents = 1 Then
Create InputCondition i corresponding to the StartEvent
Else
Create InputCondition i
Create Conditions for each StartEvent
Create Arcs linking InputCondition i to each start event
EndIf
Thanks
KM3 MetaModels
package epc {
class EPC extends NamedElement {
reference graphicalElements[3-*] ordered container : GraphicalElement;
reference arcs[2-*] ordered container : Arc;
}
class Diagram extends NamedElement {
reference epcs[1-*] ordered container : EPC;
}
class Function extends GraphicalElement {
}
class Event extends GraphicalElement {
}
class Connector extends GraphicalElement {
}
class Arc extends NamedElement {
reference source ordered : GraphicalElement oppositeOf outgoingArcs;
reference target ordered : GraphicalElement oppositeOf incomingArcs;
}
class OR extends Connector {
}
class AND extends Connector {
}
class XOR extends Connector {
}
class GraphicalElement extends NamedElement {
reference outgoingArcs[*] ordered : Arc oppositeOf source;
reference incomingArcs[*] ordered : Arc oppositeOf target;
}
class NamedElement {
attribute name[0-1] ordered : ;
}
class StartEvent extends Event {
}
class EndEvent extends Event {
}
}
package yawl {
class NamedElement {
attribute name[0-1] ordered : ;
}
class Specification extends NamedElement {
reference nets[*] ordered container : YawlNet;
}
class YawlNet extends NamedElement {
reference graphicalElements[2-*] ordered container : GraphicalElement;
reference flows[1-*] ordered container : Flow;
}
class Task extends GraphicalElement {
attribute split[0-1] ordered : TaskType;
attribute join[0-1] ordered : TaskType;
}
class Condition extends GraphicalElement {
}
class InputCondition extends Condition {
}
class OutputCondition extends Condition {
}
class AtomicTask extends Task {
}
class CompositeTask extends Task {
}
class Flow {
reference source ordered : GraphicalElement oppositeOf outgoingFlows;
reference target ordered : GraphicalElement oppositeOf incomingFlows;
}
enumeration TaskType {
literal XOR;
literal OR;
literal NONE;
literal AND;
}
class Multiple {
}
class MultipleAtomicTask extends Multiple, AtomicTask {
}
class MultipleCompositeTask extends Multiple, CompositeTask {
}
class GraphicalElement extends NamedElement {
reference outgoingFlows[*] ordered : Flow oppositeOf source;
reference incomingFlows[*] ordered : Flow oppositeOf target;
}
enumeration CreationType {
literal STATIC;
literal DYNAMIC;
}
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.03905 seconds