[SOLVED] [ATL] Put root element on all other elements [message #549214] |
Mon, 26 July 2010 07:18 |
Roger80 Messages: 79 Registered: May 2010 |
Member |
|
|
Hi all
I try to put a root element over all other elements. I studied, the reference guide of ATL, but I was not able to find something. To understand my question a little bit better here is what I have and what I want to reach:
What I have
<Task id="2" name="Request creation"/>
<Task id="5" name="Request check"/>
<Task id="11" name="Request decision"/>
<Task id="15" name="Inform about loan request"/>
<StartEvent id="1" name=" Loan request "/>
<IntermediateThrowEvent id="3" name="Request created"/>
<IntermediateThrowEvent id="9" name="Request complete"/>
<EndEvent id="16" name="Loan request finished"/>
<SequenceFlow sourceRef="1" targetRef="2"/>
<SequenceFlow sourceRef="2" targetRef="3"/>
<SequenceFlow sourceRef="3" targetRef="4"/>
<SequenceFlow sourceRef="4" targetRef="5"/>
...
What I need:
<process id = '1'>
<Task id="2" name="Request creation"/>
<Task id="5" name="Request check"/>
<Task id="11" name="Request decision"/>
<Task id="15" name="Inform about loan request"/>
<StartEvent id="1" name=" Loan request "/>
<IntermediateThrowEvent id="3" name="Request created"/>
<IntermediateThrowEvent id="9" name="Request complete"/>
<EndEvent id="16" name="Loan request finished"/>
<SequenceFlow sourceRef="1" targetRef="2"/>
<SequenceFlow sourceRef="2" targetRef="3"/>
<SequenceFlow sourceRef="3" targetRef="4"/>
<SequenceFlow sourceRef="4" targetRef="5"/>
...
</process>
Thank you very much for your help.
Cheeers Roger
[Updated on: Mon, 26 July 2010 16:28] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: [ATL] Put root element on all other elements [message #549308 is a reply to message #549295] |
Mon, 26 July 2010 12:37 |
Roger80 Messages: 79 Registered: May 2010 |
Member |
|
|
Hi all
helper def: Process : BPMN!Process = OclUndefined;
entrypoint rule Metamodel() {
to
t : BPMN!Process
do {
t.id <- '1';
thisModule.Process <- t;
}
}
rule Application {
from
c : EPK!Application
to
b : BPMN!DataObject
(
id <- c.id,
name <- c.name
),
g : BPMN!DataAssociation
(
sourceRef <- c.name,
targetRef <- c.name,
assignment2 <- ansi
),
ansi : BPMN!Assignment
(
to <- '',
from <- c.test(c.id)
)
do {
thisModule.process.t <- b;
}
}
So, do I make the right references or what do I do wrong?
Now, I get the following error:
org.eclipse.m2m.atl.engine.emfvm.VMException
at __applyApplication#67(EPL2BPMN.atl[144:3-144:29])
local variables: self=EPL2BPMN : ASMModule, link=TransientLink {rule = Application, sourceElements = {c = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@a62f5b (eClass: org.eclipse.emf.ecore.impl.EClassImpl@1bd2184 (name: Application) (instanceClassName: null) (abstract: false, interface: false))}, targetElements = {g = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@12330a6 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@36151c (name: DataAssociation) (instanceClassName: null) (abstract: false, interface: false)), b = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@14f1730 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@4b59dd (name: DataObject) (instanceClassName: null) (abstract: false, interface: false)), ansi = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@17b6cae (eClass: org.eclipse.emf.ecore.impl.EClassImpl@1ea9246 (name: Assignment) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}, c=IN!Loan application, b=OUT!Loan application, g=OUT!<unnamed>, ansi=OUT!<unnamed>
at __exec__#8(EPL2BPMN.atl)
local variables: self=EPL2BPMN : ASMModule, e=TransientLink {rule = Application, sourceElements = {c = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@a62f5b (eClass: org.eclipse.emf.ecore.impl.EClassImpl@1bd2184 (name: Application) (instanceClassName: null) (abstract: false, interface: false))}, targetElements = {g = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@12330a6 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@36151c (name: DataAssociation) (instanceClassName: null) (abstract: false, interface: false)), b = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@14f1730 (eClass: org.eclipse.emf.ecore.impl.EClassImpl@4b59dd (name: DataObject) (instanceClassName: null) (abstract: false, interface: false)), ansi = org.eclipse.emf.ecore.impl.DynamicEObjectImpl@17b6cae (eClass: org.eclipse.emf.ecore.impl.EClassImpl@1ea9246 (name: Assignment) (instanceClassName: null) (abstract: false, interface: false))}, variables = {}}
at main#48(EPL2BPMN.atl)
local variables: self=EPL2BPMN : ASMModule
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05681 seconds