Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Conditional model element creation in ATL
Conditional model element creation in ATL [message #18608] Tue, 27 February 2007 13:20 Go to next message
Eclipse UserFriend
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;
}
}
Re: Conditional model element creation in ATL [message #39142 is a reply to message #18608] Fri, 18 May 2007 10:52 Go to previous message
Joaquin  Cañadas is currently offline Joaquin CañadasFriend
Messages: 25
Registered: July 2009
Junior Member
Hi Roland,
I have a similar problem with the conditional creation of a model
element in a rule, did you find any solution?
Thank you
Joaquin

Roland Ukor escribió:
> 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;
> }
> }
>
>
>
Previous Topic:[ATL] what formalism to use to represent model transformation ?
Next Topic:[ATL] Conditional target element creation
Goto Forum:
  


Current Time: Thu Dec 26 19:52:20 GMT 2024

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

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

Back to the top