Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Put all lanes under one lane set
[ATL] Put all lanes under one lane set [message #549160] Sun, 25 July 2010 14:01 Go to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
I have 3 lanes and all of them should be grouped under 1 lane set. The problem is, that I can just group 1 lane under 1 lane set, which is not what I want. It looks like the following:

<LaneSet name="ABC Bank">
<lane id="Consultant"/>
</LaneSet>
<LaneSet name="ABC Bank">
<lane id="credit clerk"/>
</LaneSet>
<LaneSet name="ABC Bank">
<lane id="Head of credit department"/>
</LaneSet>

The result I want to have is:

<LaneSet name="ABC Bank">
<lane id="Consultant"/>
<lane id="credit clerk"/>
<lane id="Head of credit department"/>
</LaneSet>

How is this possible to realize? Should I do something with iteration? Thank you and cheers

Roger
Re: [ATL] Put all lanes under one lane set [message #549229 is a reply to message #549160] Mon, 26 July 2010 08:23 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Is there no possibility to reach that goal?

Cheers Roger
Re: [ATL] Put all lanes under one lane set [message #549328 is a reply to message #549229] Mon, 26 July 2010 13:24 Go to previous messageGo to next message
Marcel  is currently offline Marcel Friend
Messages: 54
Registered: July 2009
Member
Could you show the ATL code you use for this?

[Updated on: Mon, 26 July 2010 13:25]

Report message to a moderator

Re: [ATL] Put all lanes under one lane set [message #549340 is a reply to message #549328] Mon, 26 July 2010 13:41 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Of course. Smile

helper def: flattenLanes() : Collection(String) = 
EPK!Participant.allInstances() ->collect(e | e.id)->asSet() ->collect(e | EPK!Participant.allInstances()->select(f | f.id = e)->first());


--Rule 4 Role2Lane
rule Role2Lane {
	from
		d : EPK!Participant (thisModule.flattenLanes()->includes(d)) 
	to
		a : BPMN!LaneSet
		(
		name <- 'ABC Bank',
		--id <- d.name,
		lane <- lan 
		),
		lan : BPMN!LaneE (	
		 id <- d.name
		)
}


Do you have any clue how to solve it?

Thanks and cheers Roger
Re: [ATL] Put all lanes under one lane set [message #549345 is a reply to message #549160] Mon, 26 July 2010 13:46 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
You want to group on ids or names ?
Once you group the elements, if you keep only one, you have to affect to this one, the elements of the others that are not transformed.
Re: [ATL] Put all lanes under one lane set [message #549360 is a reply to message #549345] Mon, 26 July 2010 14:07 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Its not so important, if it easier to do on id, I would do it on id's.

Cheers Roger
Re: [ATL] Put all lanes under one lane set [message #549409 is a reply to message #549345] Mon, 26 July 2010 15:14 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
So, ok I will do on id, how can I do that then?
Re: [ATL] Put all lanes under one lane set [message #549433 is a reply to message #549345] Mon, 26 July 2010 15:45 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Ok, this is my last open point. What do you mean with:

> Once you group the elements, if you keep only one,

You know that I have just 3 elements left

> you have to affect to this one, the elements of the others that are not transformed.

What do you mean with that, do I have to do some coding?

Thank you very much for your help.

Cheers Roger
Re: [ATL] Put all lanes under one lane set [message #549556 is a reply to message #549433] Tue, 27 July 2010 08:13 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Please, can you give me advice how to do. As I mentioned, this is my last problem and I have to hand in tommorrow.

Thank you very much!

Cheers Roger
Re: [ATL] Put all lanes under one lane set [message #549559 is a reply to message #549160] Tue, 27 July 2010 08:24 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
I don't think we can always do your own work. Ask precise questions if you want answers.
Re: [ATL] Put all lanes under one lane set [message #549563 is a reply to message #549559] Tue, 27 July 2010 08:41 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Hello Sylvain

I understand you. Sorry.
Ok, then, what method do I have to use to realize the problem? I do even not now were to start.

Thank you.
Re: [ATL] Put all lanes under one lane set [message #549568 is a reply to message #549160] Tue, 27 July 2010 09:00 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Think about algorithm, that is totally technology independant so you can't ask about that.
Re: [ATL] Put all lanes under one lane set [message #549609 is a reply to message #549568] Tue, 27 July 2010 11:15 Go to previous message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Ok, I thought about it and I think it should work like the following.

Theoretical algorithm:
1) The algorithm has to check if a Lane Set is already available.
2) If this the LaneSet is available -> put Lane under LaneSet
3) If Lane Set is not available create LaneSet.

So, as the LaneSet can just be identified over the name I have to do this check over the name.

The problem I see and do not understand is, that the LaneSet is the target node and how should I check if a target node is available or not?

So, that is what I have so far. I am happy for further inputs. Thank you...

Cheers Roger
Previous Topic:[SOLVED] [ATL] Put root element on all other elements
Next Topic:[QVTO] How to generate a trace file
Goto Forum:
  


Current Time: Fri Dec 13 19:34:56 GMT 2024

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

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

Back to the top