Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Possibility to have several levels in an XMI File?
icon5.gif  Possibility to have several levels in an XMI File? [message #547629] Mon, 19 July 2010 08:12 Go to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Hello is it possible to have something like

sequenceFlow sourceRef="Sum < 10000 CHF" targetRef="Give positive feedback">
				<conditionExpression>Request accepted</conditionExpression>
			</sequenceFlow>


Until now, I was just able to handle something like:

<sequenceFlow sourceRef="Sum &lt; 10000 CHF" targetRef="Give positive feedback"/>


I need this two levels, please could you help me? Thanks and cheers

Roger
Re: Possibility to have several levels in an XMI File? [message #547638 is a reply to message #547629] Mon, 19 July 2010 08:42 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Le 19/07/2010 10:12, Roger80 a écrit :
> Hello is it possible to have something like
> sequenceFlow sourceRef="Sum < 10000 CHF" targetRef="Give positive
> feedback">
> <conditionExpression>Request accepted</conditionExpression>
> </sequenceFlow>
>
>
> Until now, I was just able to handle something like:
>
>
> <sequenceFlow sourceRef="Sum < 10000 CHF" targetRef="Give positive
> feedback"/>
>
>
> I need this two levels, please could you help me? Thanks and cheers
> Roger

Indicate in your metamodel that for a SequenceFlow, conditions are
"contained". So EMF will store conditions into corresponding SeqFlow...
--
Cordialement

Vincent MAHÉ

Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
Re: Possibility to have several levels in an XMI File? [message #547682 is a reply to message #547638] Mon, 19 July 2010 11:03 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Thanks for your answer!

Can you explain that a bit more detailed, I do not understand what you exactly mean?

Thanks and cheers

Roger
Re: Possibility to have several levels in an XMI File? [message #547691 is a reply to message #547638] Mon, 19 July 2010 11:10 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Le 19/07/2010 10:42, Vincent MAHE a écrit :
> Le 19/07/2010 10:12, Roger80 a écrit :
>> Hello is it possible to have something like
>> sequenceFlow sourceRef="Sum < 10000 CHF" targetRef="Give positive
>> feedback">
>> <conditionExpression>Request accepted</conditionExpression>
>> </sequenceFlow>
>>
>>
>> Until now, I was just able to handle something like:
>>
>>
>> <sequenceFlow sourceRef="Sum < 10000 CHF" targetRef="Give positive
>> feedback"/>
>>
>>
>> I need this two levels, please could you help me? Thanks and cheers
>> Roger
>
> Indicate in your metamodel that for a SequenceFlow, conditions are
> "contained". So EMF will store conditions into corresponding SeqFlow...

The structure of your model s managed by EMF which itself relies on the
metamodel syntax.

If you want a type (like SequenceFlow) to hold an underlying type (like
Expression) through a reference (as your conditionExpression), you must
declare it in the metamodel (that is set ON the containment value of the
reference):

Class SequenceFlow
reference conditionExpression
containment = true
eType = Expression
--
Cordialement

Vincent MAHÉ

Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
Re: Possibility to have several levels in an XMI File? [message #548197 is a reply to message #547691] Wed, 21 July 2010 04:54 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Hello Vincent

I checkde the settings and they are really like you described. How can I then call this in a transformation rule, do I need a "lazy rule"?
Because I need 4 classes (ControlFlow --> Sequence Flow and Event --> ConditionExpression) and in a rule I can just have two classes, right?

Thanks and cheers

Roger
Re: Possibility to have several levels in an XMI File? [message #548231 is a reply to message #547629] Wed, 21 July 2010 08:03 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
In a rule you can have as many output elements as you want (1 or more though)
Re: Possibility to have several levels in an XMI File? [message #548384 is a reply to message #547629] Wed, 21 July 2010 16:05 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Ok, how can I do that then? I have the following rule:

rule Flow {
from
	e : EPK!ControlFlow (not e.isConditionExpression())

to 
	b : BPMN!SequenceFlow or Expression
	 (
	 	id <- e.id,
	 	name <- e.name,
	 	sourceRef <- e.source,
	 	targetRef <- e.target
 	)
 }


Thanks and cheers Roger
Re: Possibility to have several levels in an XMI File? [message #548386 is a reply to message #547629] Wed, 21 July 2010 16:07 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
Erm no, what are you trying to achieve ?
Re: Possibility to have several levels in an XMI File? [message #548389 is a reply to message #548386] Wed, 21 July 2010 16:13 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Hello is it possible to have something like

sequenceFlow sourceRef="Sum &lt; 10000 CHF" targetRef="Give positive feedback">
				<conditionExpression>Request accepted</conditionExpression>
			</sequenceFlow>


Until now, I was just able to handle something like:

<sequenceFlow sourceRef="Sum &lt; 10000 CHF" targetRef="Give positive feedback"/>


I need this two levels, please could you help me?

I set now the correct settings on the metamodel, but now how can I call the second class <conditionExpression>?

Cheers Roger
Re: Possibility to have several levels in an XMI File? [message #548394 is a reply to message #547629] Wed, 21 July 2010 16:41 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
to
b : BPMN!SequenceFlow(
bindings...
),
c : BPMN!Expression (
bindings...
)

Of course you can use b in the bindings of c or c in the bindings of b to make the link between the two if needed
Re: Possibility to have several levels in an XMI File? [message #548436 is a reply to message #547629] Wed, 21 July 2010 20:23 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Thanks this worked pretty fine. Smile My next issue is to call a helper within the bindings and then to give the name back to the rule. The problem is I don't know how to call a helper inside an rule and to overgive the helper some values (variables) and to get also some back...Is this possible?

My rule looks:
-- Rule 13 / 11a with conditionalExpression
rule ConditionExpression {
from
e : EPK!ControlFlow (e.isConditionExpression())
to
b : BPMN!SequenceFlow
(
name <- e.name
),
con : BPMN!ConditionExpression(
name <- thisModule.getConditionName( overgive id, take back name)
)
}

My helper looks:

--Make two level - Rule 13 with conditionalExpression
helper context EPK!ControlFlow def: getConditionName(take id, give back name ) : Sequence(String) =
EPK!Event.allInstances()-> select(e | e.target=self.id)->collect(e | e.name);

Thank you very much that you looking at it....I am really close to my target, if this works. Smile

Cheers Roger

[Updated on: Thu, 22 July 2010 09:10]

Report message to a moderator

Re: Possibility to have several levels in an XMI File? [message #548485 is a reply to message #548436] Thu, 22 July 2010 06:20 Go to previous messageGo to next message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Le 21/07/2010 22:23, Roger80 a écrit :
> Thanks this worked pretty fine. :) My next issue is to call a helper
> within the bindings and then to give the name back to the rule. The
> problem is I don't know how to call a helper inside an rule and to
> overgive the helper some values (variables) and to get also some
> back...Is this possible?
>
> My rule looks:
> -- Rule 13 / 11a with conditionalExpression
> rule ConditionExpression {
> from
> e : EPK!ControlFlow (e.isConditionExpression()) -- and
> he.isConditionExpressionEvent() and not e.isStarter() and
> e.isNotEventEndEvent())
> to
> b : BPMN!SequenceFlow (
> name <- e.name,

conditionExpression <- c

> --name <-

),
> con : BPMN!ConditionExpression(
> name <- thisModule.getConditionName( overgive id, take back name)
> )
> }
>
> My helper looks:
>
> --Make two level - Rule 13 with conditionalExpression
> helper context EPK!ControlFlow def: getConditionName(take id, give back
> name ) : Sequence(String) =
> EPK!Event.allInstances()-> select(e | e.target=self.id)->collect(e |
> e.name);
>
> Thank you very much that you looking at it....I am really close to my
> target, if this works. :)
>
> Cheers Roger


--
Cordialement

Vincent MAHÉ

Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
Re: Possibility to have several levels in an XMI File? [message #548516 is a reply to message #548485] Thu, 22 July 2010 08:54 Go to previous messageGo to next message
Roger80  is currently offline Roger80 Friend
Messages: 79
Registered: May 2010
Member
Hello Vincent

What do you mean with?

conditionExpression <- c

What is this c for?
I want to call a helper inside a rule and overgive some values and get back some values as you can see it above (fat) signed.

Thanks and cheers Roger

[Updated on: Thu, 22 July 2010 09:03]

Report message to a moderator

Re: Possibility to have several levels in an XMI File? [message #548543 is a reply to message #548516] Thu, 22 July 2010 09:41 Go to previous message
Vincent MAHE is currently offline Vincent MAHEFriend
Messages: 129
Registered: July 2009
Senior Member
Le 22/07/2010 10:54, Roger80 a écrit :
> Hello Vincent
>
> What do you mean with?
>
>
>
> What is this c for?
>
> Thanks and cheers Roger

Sorry! It is :

conditionExpression <- con

(you have to include the condition into the sequece flow)
--
Cordialement

Vincent MAHÉ

Ingénieur Expert - Projet IDM++ - Équipe AtlanMod
École des Mines de Nantes
La Chantrerie - 4, rue Alfred Kastler
B.P. 20722 - F-44307 NANTES Cedex 3
Tel: (33)2 51 85 81 00
Previous Topic:[ATL] inverse function of refImmediateComposite()
Next Topic:[ATL] Problem with UML property
Goto Forum:
  


Current Time: Thu Mar 28 09:59:51 GMT 2024

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

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

Back to the top