[ATL] transformation one element in two elements and their arrangement [message #539829] |
Sun, 13 June 2010 15:07  |
Eclipse User |
|
|
|
Hello everybody,
I want to map some structure with ATL, but I can't. Maybe anybody have an idea how can I get this?
What I want is to transform one particular element in two different elements and put one of them into another indirectly.
Here is the example:
entrypoint rule Metamodel() {
to t : uml!Model(
packagedElement <- bpmn!BPool.allInstances()->collect(a | thisModule.r0(a)),
packagedElement <- bpmn!BLane.allInstances() -> collect(a | thisModule.r1(a)) )
do { thisModule.Model <- t; }}
unique lazy rule r0{
from X0 : bpmn!Pool
to Y0 : uml!Collaboration(
ownedAttribute <-X1.Lanes->->collect(a | thisModule.r1(a)) )}
unique lazy rule r1{
from X1 : bpmn!Lane
to Y1 : uml!Class(
ownedBehavior <-X1.Elements->->collect(a | thisModule.r2(a)) )}
unique lazy rule r2{
from X2 : bpmn!Task
to Y2 : uml!Activity(
group <-X2.findPArentPool()->collect(a | thisModule.r3(a)) )}
unique lazy rule r3{
from X3 : bpmn!Pool
to Y3 : uml!ActivityPartition(
subpartition<- X3.Lanes->collect(a | thisModule.r4(a)) )}
unique lazy rule r4{
from X4 : bpmn!Lane
to Y4 : uml!ActivityPartition( )}
I always get the error: An internal error occurred during: "Launching BPMN2SoaML".
org.eclipse.emf.ecore.impl.DynamicEObjectImpl cannot be cast to java.util.Collection.
I have already tried many different solutions, but I can't get such hierarchy as I want.
I use Eclipse 3.4.2, ATL 3.0.1, EMF-specific VM.
Thank you for any help!
Katya
|
|
|
|
|
|
Re: [ATL] transformation one element in two elements and their arrangement [message #540333 is a reply to message #539950] |
Tue, 15 June 2010 13:22  |
Eclipse User |
|
|
|
Ok, what I want to do is to transform a set of elements in 2 different sets of elements and then nest one of this set into one element of the other set. It is something like a common view of model and another views like a process view, data view and I want to combine them in one document.
My real example is much more longer, but I tried a simple example looking like the example I posted at the beginning (without typing mistakes:) ) and I have the same error.
I want to get tree structure like this:
Model
--->Collaboration (from Pool)
--->Class (from Lane)
------->Activity (from Task)
------------>ActivityPartition (from Pool)
---------------------->ActivityPartition (from Lane)
But If I use the last 2 rules I get this error...
I also tried this example with ATL 2.0.2, Eclipse 3.4.1, regular VM. I get no error, but the output tree looks like this:
Model
--->Collaboration (from Pool)
--->Class (from Lane)
--------->Activity (from Task)
ActivityPartition (from Pool)
--->ActivityPartition (from Lane)
and it is not what I want.
Is it possible to get the structure I want?
Thank you.
[Updated on: Tue, 15 June 2010 13:25] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.28603 seconds