Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: allOwnedElements() omits StructuredActivity's children
Re: allOwnedElements() omits StructuredActivity's children [message #627034] Wed, 15 October 2008 12:41
Eclipse UserFriend
Originally posted by:

Hi, Rafael,

See some replies in-line, below.



Rafael Chaves wrote:
> I have a very simple UML model:
> Package
> +-Activity
> +-Comment
> +-StructuredActivityNode
> +-Comment
> +-ObjectFlow
> +-CreateObjectAction
> +-ActivityParameterNode
> +-InputPin
> It is only bogus like that because I was trying to understand the
> behavior below.
> Then I start playing with the OCL console (btw, *very* handy little
> tool, thanks!):

Heh heh ... I'm glad you're enjoying it. I find it quite useful for
querying models. OCL has a not-quite-surprising ability to express
virtually all of the questions we might ask about a model.

> Evaluating:
> Action.allInstances()
> Results:
> <Structured Activity Node>
> <Create Object Action>
> That is awesome. However, the following test puzzles me:
> Evaluating:
> self.allOwnedElements()
> Results:
> <Structured Activity Node>
> <Comment>
> <Comment>
> <Activity>
> What is the explanation for this result? At some point I thought it was
> somehow stopping at the StructuredActivityNode and not going deeper. But
> then I added a comment to it and it showed the comment.

The allInstances() operation is defined by OCL, but the
Element::allOwnedElements() operation is not. It is defined by UML2. I
think it is defined in the specification, not just by the implementation.

allOwnedElements() is a recursive application of the ownedElement
derived union. So, if you are missing any elements, then it is because
ownedElement is missing some subsets.

I have included the MDT UML2 newsgroup in this reply so that they may
help you to correlate the missing subsets to UML RTF issues and/or raise
new ones as necessary. Any problems of missing subsets are most likely
errors in the UML specification than defects in the implementation.

> Any ideas?
> Thanks.
> Rafael
Previous Topic:Relationship between UML and a custom model
Next Topic:Re: Building UML2-approximated Model in EMF
Goto Forum:

Current Time: Mon Aug 08 22:21:15 GMT 2022

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

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

Back to the top