Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » UML2 4.0 and ActivityNodes
UML2 4.0 and ActivityNodes [message #892991] Mon, 02 July 2012 08:44 Go to next message
Peter  is currently offline Peter
Messages: 85
Registered: July 2009
Member
Hi,
I just tested the new Juno UML2 4.0 Release and came across something
that is curious for me.

When I run this code snippet:
Activity act = UMLFactory.eINSTANCE.createActivity();
pack.getPackagedElements().add(act);
InitialNode initialNode = UMLFactory.eINSTANCE.createInitialNode();
--> act.getNodes().add(initialNode);
// leads to The object is not contained in a resource error during the
// save but from my perspective it is ok?!
--> initialNode.setActivity(act);
// This works fine but all my code uses the approach above.

Am I wrong?
Greetings Peter
Re: UML2 4.0 and ActivityNodes [message #893005 is a reply to message #892991] Mon, 02 July 2012 09:13 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4098
Registered: July 2009
Senior Member
Hi Peter

I think that ownership of ActiveNodes was an area where things had to be
sorted out in UML 2.4.1. You probably need to do some specification
study to check on the modeling intent and then some MDT/UML2 study to
see whether that intent is realised.

Regards

Ed Willink

On 02/07/2012 09:44, Peter wrote:
> Hi,
> I just tested the new Juno UML2 4.0 Release and came across something
> that is curious for me.
>
> When I run this code snippet:
> Activity act = UMLFactory.eINSTANCE.createActivity();
> pack.getPackagedElements().add(act);
> InitialNode initialNode = UMLFactory.eINSTANCE.createInitialNode();
> --> act.getNodes().add(initialNode);
> // leads to The object is not contained in a resource error during the
> // save but from my perspective it is ok?!
> --> initialNode.setActivity(act);
> // This works fine but all my code uses the approach above.
>
> Am I wrong?
> Greetings Peter
Re: UML2 4.0 and ActivityNodes [message #893014 is a reply to message #893005] Mon, 02 July 2012 09:50 Go to previous messageGo to next message
Peter  is currently offline Peter
Messages: 85
Registered: July 2009
Member
Hi Ed,
mhh I found this section in the Migration Guide:
Changes in the revised UML 2.4.1 specification (to resolve issue 16232)
also required the following changes:

-Non-compliant Activity::ownedNode and Activity::ownedGroup properties
were introduced to compose nodes and groups which are not structured
activity nodes.
-Serialization (and deserialization) of the Activity::group and
Activity::node properties were customized so that they include idref
attributes which reference any XMI elements (serialized for the
Activity::structuredNode property) representing structured activity
nodes composed by the activity.
(http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide#XMI_Interchange)

Looks like something has changed in the Specification.
I look at it. Thanks!
Greetings
Peter

Am 02.07.2012 11:13, schrieb Ed Willink:
> Hi Peter
>
> I think that ownership of ActiveNodes was an area where things had to be
> sorted out in UML 2.4.1. You probably need to do some specification
> study to check on the modeling intent and then some MDT/UML2 study to
> see whether that intent is realised.
>
> Regards
>
> Ed Willink
>
> On 02/07/2012 09:44, Peter wrote:
>> Hi,
>> I just tested the new Juno UML2 4.0 Release and came across something
>> that is curious for me.
>>
>> When I run this code snippet:
>> Activity act = UMLFactory.eINSTANCE.createActivity();
>> pack.getPackagedElements().add(act);
>> InitialNode initialNode = UMLFactory.eINSTANCE.createInitialNode();
>> --> act.getNodes().add(initialNode);
>> // leads to The object is not contained in a resource error during the
>> // save but from my perspective it is ok?!
>> --> initialNode.setActivity(act);
>> // This works fine but all my code uses the approach above.
>>
>> Am I wrong?
>> Greetings Peter
>
Re: UML2 4.0 and ActivityNodes [message #893018 is a reply to message #893014] Mon, 02 July 2012 10:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4098
Registered: July 2009
Senior Member
Hi

There has also been some quite intense discussion on related topics as
part of the UML 2.5 simplification process. The draft is now available
for review by OMG members, so if you have access you might want to also
see whether this is an area where a problem has already been solved.

Regards

Ed Willink


On 02/07/2012 10:50, Peter wrote:
> Hi Ed,
> mhh I found this section in the Migration Guide:
> Changes in the revised UML 2.4.1 specification (to resolve issue
> 16232) also required the following changes:
>
> -Non-compliant Activity::ownedNode and Activity::ownedGroup properties
> were introduced to compose nodes and groups which are not structured
> activity nodes.
> -Serialization (and deserialization) of the Activity::group and
> Activity::node properties were customized so that they include idref
> attributes which reference any XMI elements (serialized for the
> Activity::structuredNode property) representing structured activity
> nodes composed by the activity.
> (http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide#XMI_Interchange)
>
>
> Looks like something has changed in the Specification.
> I look at it. Thanks!
> Greetings
> Peter
>
> Am 02.07.2012 11:13, schrieb Ed Willink:
>> Hi Peter
>>
>> I think that ownership of ActiveNodes was an area where things had to be
>> sorted out in UML 2.4.1. You probably need to do some specification
>> study to check on the modeling intent and then some MDT/UML2 study to
>> see whether that intent is realised.
>>
>> Regards
>>
>> Ed Willink
>>
>> On 02/07/2012 09:44, Peter wrote:
>>> Hi,
>>> I just tested the new Juno UML2 4.0 Release and came across something
>>> that is curious for me.
>>>
>>> When I run this code snippet:
>>> Activity act = UMLFactory.eINSTANCE.createActivity();
>>> pack.getPackagedElements().add(act);
>>> InitialNode initialNode = UMLFactory.eINSTANCE.createInitialNode();
>>> --> act.getNodes().add(initialNode);
>>> // leads to The object is not contained in a resource error during the
>>> // save but from my perspective it is ok?!
>>> --> initialNode.setActivity(act);
>>> // This works fine but all my code uses the approach above.
>>>
>>> Am I wrong?
>>> Greetings Peter
>>
>
>
Re: UML2 4.0 and ActivityNodes [message #893226 is a reply to message #893018] Tue, 03 July 2012 09:35 Go to previous message
Peter  is currently offline Peter
Messages: 85
Registered: July 2009
Member
Hi Ed,
thanks you for the remark but I am not a OMG member.
I played a bit around with the ActivityNode topic this morning and I
think there is still something wrong.
As I understand the remark in the Migration Guide they changed the
Activity:structuredNode feature to non derived and because of that the
MDT/UML2 guys introduced Activity::ownedNode to compose nodes that are
non structured activity nodes.
So far so good. I adapted my code to use getOwnedNodes() instead of
getNodes() but when I want to remove the node from the activity with my
generic method that use
EcoreUtil.remove(node);
The node is not removed from the ownedNodes feature.
As workaround EcoreUtil.delete(node) does the job.
Greetings Peter



Am 02.07.2012 12:20, schrieb Ed Willink:
> Hi
>
> There has also been some quite intense discussion on related topics as
> part of the UML 2.5 simplification process. The draft is now available
> for review by OMG members, so if you have access you might want to also
> see whether this is an area where a problem has already been solved.
>
> Regards
>
> Ed Willink
>
>
> On 02/07/2012 10:50, Peter wrote:
>> Hi Ed,
>> mhh I found this section in the Migration Guide:
>> Changes in the revised UML 2.4.1 specification (to resolve issue
>> 16232) also required the following changes:
>>
>> -Non-compliant Activity::ownedNode and Activity::ownedGroup properties
>> were introduced to compose nodes and groups which are not structured
>> activity nodes.
>> -Serialization (and deserialization) of the Activity::group and
>> Activity::node properties were customized so that they include idref
>> attributes which reference any XMI elements (serialized for the
>> Activity::structuredNode property) representing structured activity
>> nodes composed by the activity.
>> (http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide#XMI_Interchange)
>>
>>
>> Looks like something has changed in the Specification.
>> I look at it. Thanks!
>> Greetings
>> Peter
>>
>> Am 02.07.2012 11:13, schrieb Ed Willink:
>>> Hi Peter
>>>
>>> I think that ownership of ActiveNodes was an area where things had to be
>>> sorted out in UML 2.4.1. You probably need to do some specification
>>> study to check on the modeling intent and then some MDT/UML2 study to
>>> see whether that intent is realised.
>>>
>>> Regards
>>>
>>> Ed Willink
>>>
>>> On 02/07/2012 09:44, Peter wrote:
>>>> Hi,
>>>> I just tested the new Juno UML2 4.0 Release and came across something
>>>> that is curious for me.
>>>>
>>>> When I run this code snippet:
>>>> Activity act = UMLFactory.eINSTANCE.createActivity();
>>>> pack.getPackagedElements().add(act);
>>>> InitialNode initialNode = UMLFactory.eINSTANCE.createInitialNode();
>>>> --> act.getNodes().add(initialNode);
>>>> // leads to The object is not contained in a resource error during the
>>>> // save but from my perspective it is ok?!
>>>> --> initialNode.setActivity(act);
>>>> // This works fine but all my code uses the approach above.
>>>>
>>>> Am I wrong?
>>>> Greetings Peter
>>>
>>
>>
>


Am 02.07.2012 12:20, schrieb Ed Willink:
> Hi
>
> There has also been some quite intense discussion on related topics as
> part of the UML 2.5 simplification process. The draft is now available
> for review by OMG members, so if you have access you might want to also
> see whether this is an area where a problem has already been solved.
>
> Regards
>
> Ed Willink
>
>
> On 02/07/2012 10:50, Peter wrote:
>> Hi Ed,
>> mhh I found this section in the Migration Guide:
>> Changes in the revised UML 2.4.1 specification (to resolve issue
>> 16232) also required the following changes:
>>
>> -Non-compliant Activity::ownedNode and Activity::ownedGroup properties
>> were introduced to compose nodes and groups which are not structured
>> activity nodes.
>> -Serialization (and deserialization) of the Activity::group and
>> Activity::node properties were customized so that they include idref
>> attributes which reference any XMI elements (serialized for the
>> Activity::structuredNode property) representing structured activity
>> nodes composed by the activity.
>> (http://wiki.eclipse.org/MDT/UML2/UML2_4.0_Migration_Guide#XMI_Interchange)
>>
>>
>> Looks like something has changed in the Specification.
>> I look at it. Thanks!
>> Greetings
>> Peter
>>
>> Am 02.07.2012 11:13, schrieb Ed Willink:
>>> Hi Peter
>>>
>>> I think that ownership of ActiveNodes was an area where things had to be
>>> sorted out in UML 2.4.1. You probably need to do some specification
>>> study to check on the modeling intent and then some MDT/UML2 study to
>>> see whether that intent is realised.
>>>
>>> Regards
>>>
>>> Ed Willink
>>>
>>> On 02/07/2012 09:44, Peter wrote:
>>>> Hi,
>>>> I just tested the new Juno UML2 4.0 Release and came across something
>>>> that is curious for me.
>>>>
>>>> When I run this code snippet:
>>>> Activity act = UMLFactory.eINSTANCE.createActivity();
>>>> pack.getPackagedElements().add(act);
>>>> InitialNode initialNode = UMLFactory.eINSTANCE.createInitialNode();
>>>> --> act.getNodes().add(initialNode);
>>>> // leads to The object is not contained in a resource error during the
>>>> // save but from my perspective it is ok?!
>>>> --> initialNode.setActivity(act);
>>>> // This works fine but all my code uses the approach above.
>>>>
>>>> Am I wrong?
>>>> Greetings Peter
>>>
>>
>>
>
Previous Topic:element.getXYZs(String name, boolean ignoreCase, EClass eclass)
Next Topic:[CDO] Encounter java.lang.OutOfMemoryError: GC overhead limit exceeded when commit from 4 clients
Goto Forum:
  


Current Time: Sat Oct 25 18:59:35 GMT 2014

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

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