Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF bidirectional validation failing
EMF bidirectional validation failing [message #546495] Tue, 13 July 2010 06:51 Go to next message
Volker Stolz is currently offline Volker StolzFriend
Messages: 63
Registered: July 2009
Member
Dear all, in Helios, literally all my UML models no longer validate,
including trivial new ones. For example, in the Helios Modeling Tools
release, I create a new UML model with the following structure:

+ Model
+ Statemachine
+ Region
+ Transition
+Trigger

Selecting "Validate" in the UML editor will then yield:

"The opposite features 'owner' of '<Trigger> s' and 'ownedElement' of
'<Transition> k' do not refer to each other"

Likewise, in the OCL console, on the transition, querying for 'trigger'
will return the trigger, but both 'ownedMember' and 'ownedElement'
return an empty result set (which is why the validation seems to be
failing).

I'm observing this on two different Helios installations (MacOS MDT
20100617-1415, Solaris x86 3.6RC4).

Thanks in advance for any clues as to what I'm doing wrong!

Volker, F'Up set

--
United Nations University -
Re: EMF bidirectional validation failing [message #546580 is a reply to message #546495] Tue, 13 July 2010 13:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Volker,

Comments below.


Volker Stolz wrote:
> Dear all, in Helios, literally all my UML models no longer validate,
> including trivial new ones. For example, in the Helios Modeling Tools
> release, I create a new UML model with the following structure:
>
> + Model
> + Statemachine
> + Region
> + Transition
> +Trigger
>
> Selecting "Validate" in the UML editor will then yield:
>
> "The opposite features 'owner' of '<Trigger> s' and 'ownedElement' of
> '<Transition> k' do not refer to each other"
>
This is an Ecore constraint but you said you had UML model. So perhaps
the UML to Ecore converter isn't producing a valid instance for some
reason I can't explain from just the information you've provided. Have
a look at the actual Ecore model and in particular at which feature is
the opposite for owner and which feature is the opposite for
ownedElement. They must point back at each other, i.e., they must form
a mutually referencing pair. The constraint is pointing out that this
is not the case.
> Likewise, in the OCL console, on the transition, querying for 'trigger'
> will return the trigger, but both 'ownedMember' and 'ownedElement'
> return an empty result set (which is why the validation seems to be
> failing).
>
> I'm observing this on two different Helios installations (MacOS MDT
> 20100617-1415, Solaris x86 3.6RC4).
>
> Thanks in advance for any clues as to what I'm doing wrong!
>
> Volker, F'Up set
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF bidirectional validation failing [message #546734 is a reply to message #546580] Wed, 14 July 2010 02:11 Go to previous messageGo to next message
Volker Stolz is currently offline Volker StolzFriend
Messages: 63
Registered: July 2009
Member
In article <i1hofp$rkn$1@build.eclipse.org>,
Ed Merks <Ed.Merks@gmail.com> wrote:

> Volker,
> Comments below.

Ed, thanks for your input. I'm using the Example EMF Model Creation
Wizard to create the UML model (here; as reported I get the same problem
with programmatically generated UML files).
In this case, I only stay within the editor, and there is no (separate,
on-disk) Ecore model (except the UML models in-memory representation).
There's also nothing in the Error Log, and I just checked with a fresh
Classic Helios and only installed the UML2Extender.

This is the trivial model.uml (never mind the line breaks). :

<?xml version="1.0" encoding="UTF-8"?>
<uml:Model xmi:version="2.1"
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
xmi:id="_89dnMI6MEd-MxvZKuoG_jg" viewpoint="">
<packagedElement xmi:type="uml:StateMachine"
xmi:id="_-hY4EI6MEd-MxvZKuoG_jg">
<region xmi:id="__yf6oI6MEd-MxvZKuoG_jg">
<transition xmi:id="_ArWOMI6NEd-MxvZKuoG_jg">
<trigger xmi:id="_Ba40wI6NEd-MxvZKuoG_jg"/>
</transition>
</region>
</packagedElement>
</uml:Model>

Should this better go to one of the UML groups?

Volker

--
United Nations University -
Re: EMF bidirectional validation failing [message #546862 is a reply to message #546734] Wed, 14 July 2010 13:11 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060106010400030800080808
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Volker,

Yes, best to ask on the UML newsgroup. I haven't a clue. I wonder if
the complaints about source and target not being set might be the cause
of these other problems.


Volker Stolz wrote:
> In article <i1hofp$rkn$1@build.eclipse.org>,
> Ed Merks <Ed.Merks@gmail.com> wrote:
>
>
>> Volker,
>> Comments below.
>>
>
> Ed, thanks for your input. I'm using the Example EMF Model Creation
> Wizard to create the UML model (here; as reported I get the same problem
> with programmatically generated UML files).
> In this case, I only stay within the editor, and there is no (separate,
> on-disk) Ecore model (except the UML models in-memory representation).
> There's also nothing in the Error Log, and I just checked with a fresh
> Classic Helios and only installed the UML2Extender.
>
> This is the trivial model.uml (never mind the line breaks). :
>
> <?xml version="1.0" encoding="UTF-8"?>
> <uml:Model xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> xmi:id="_89dnMI6MEd-MxvZKuoG_jg" viewpoint="">
> <packagedElement xmi:type="uml:StateMachine"
> xmi:id="_-hY4EI6MEd-MxvZKuoG_jg">
> <region xmi:id="__yf6oI6MEd-MxvZKuoG_jg">
> <transition xmi:id="_ArWOMI6NEd-MxvZKuoG_jg">
> <trigger xmi:id="_Ba40wI6NEd-MxvZKuoG_jg"/>
> </transition>
> </region>
> </packagedElement>
> </uml:Model>
>
> Should this better go to one of the UML groups?
>
> Volker
>
>

--------------060106010400030800080808
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Volker,<br>
<br>
Yes, best to ask on the UML newsgroup.&nbsp; I haven't a clue.&nbsp; I wonder if
the complaints about source and target not being set might be the cause
of these other problems. <br>
<br>
<br>
Volker Stolz wrote:
<blockquote cite="mid:vs-C2286A.10112814072010@news.eclipse.org"
type="cite">
<pre wrap="">In article <a class="moz-txt-link-rfc2396E" href="mailto:i1hofp$rkn$1@build.eclipse.org">&lt;i1hofp$rkn$1@build.eclipse.org&gt;</a>,
Ed Merks <a class="moz-txt-link-rfc2396E" href="mailto:Ed.Merks@gmail.com">&lt;Ed.Merks@gmail.com&gt;</a> wrote:

</pre>
<blockquote type="cite">
<pre wrap="">Volker,
Comments below.
</pre>
</blockquote>
<pre wrap=""><!---->
Ed, thanks for your input. I'm using the Example EMF Model Creation
Wizard to create the UML model (here; as reported I get the same problem
with programmatically generated UML files).
In this case, I only stay within the editor, and there is no (separate,
on-disk) Ecore model (except the UML models in-memory representation).
There's also nothing in the Error Log, and I just checked with a fresh
Classic Helios and only installed the UML2Extender.

This is the trivial model.uml (never mind the line breaks). :

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;uml:Model xmi:version="2.1"
xmlns:xmi=<a class="moz-txt-link-rfc2396E" href="http://schema.omg.org/spec/XMI/2.1">"http://schema.omg.org/spec/XMI/2.1"</a>
xmlns:uml=<a class="moz-txt-link-rfc2396E" href="http://www.eclipse.org/uml2/3.0.0/UML">"http://www.eclipse.org/uml2/3.0.0/UML"</a>
xmi:id="_89dnMI6MEd-MxvZKuoG_jg" viewpoint=""&gt;
&lt;packagedElement xmi:type="uml:StateMachine"
xmi:id="_-hY4EI6MEd-MxvZKuoG_jg"&gt;
&lt;region xmi:id="__yf6oI6MEd-MxvZKuoG_jg"&gt;
&lt;transition xmi:id="_ArWOMI6NEd-MxvZKuoG_jg"&gt;
&lt;trigger xmi:id="_Ba40wI6NEd-MxvZKuoG_jg"/&gt;
&lt;/transition&gt;
&lt;/region&gt;
&lt;/packagedElement&gt;
&lt;/uml:Model&gt;

Should this better go to one of the UML groups?

Volker

</pre>
</blockquote>
</body>
</html>

--------------060106010400030800080808--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF bidirectional validation failing [message #547696 is a reply to message #546862] Mon, 19 July 2010 11:33 Go to previous message
Volker Stolz is currently offline Volker StolzFriend
Messages: 63
Registered: July 2009
Member
In article <i1kd1d$69d$1@build.eclipse.org>,
Ed Merks <Ed.Merks@gmail.com> wrote:

> Yes, best to ask on the UML newsgroup. I haven't a clue. I wonder if
> the complaints about source and target not being set might be the cause
> of these other problems.

(x-posting/f-up to .uml2)

Hi Ed, I think this might be unlikely. So far I have two instances of
this validation problem:

namespace <-> ownedMember
owner <-> ownedElement

One of those other examples is that if I have

+ Component c
+ Property p
+ InterfaceRealization r

the property is in c.ownedMembers, and the interface realization isn't.

I am wondering if this means that the UML metamodel is not consistent
with your validation rule (from [280397]): it says that ownedMember is
the opposite of namespace, but even from looking at the source (Galileo
and Helios) it is clear that the implementation of e.g. Component never
ensured this. I double-checked with the OCL interpreter in Galileo, it
has the same result (ownedMember doesn't contain the interface
realization), so the only difference seems to be the bidirectional
validation that you added a while ago (I'm not aware of the UML
metamodel changing in the meantime as well).

For clarification, let me give this problem another spin: from looking
e.g. at ComponentImpl, it is obvious that the InterfaceRealization will
only be included in ownedElements, but not in ownedMembers. However, the
Javadoc (presumably generated from the metamodel) says that the opposite
of namespace is ownedMember, which clearly isn't the case for
InterfaceRealization. I am wondering if your validation rule is finally
exposing a bug in the UML metamodel, where either this opposite
feature-relationship was incorrectly specified, or that the generated
code does not correctly reflect that e.g. interface realizations should
be included in ownedMembers.

I guess I'll raise a bug in MDT if nobody else has any idea (and once
I'm past my surprise that nobody else is observing this---it means that
most people are happy with UML class diagrams and don't actually venture
to component diagrams or state machines ;)

Volker

> Volker Stolz wrote:
> > In article <i1hofp$rkn$1@build.eclipse.org>,
> > Ed Merks <Ed.Merks@gmail.com> wrote:
>
> > Ed, thanks for your input. I'm using the Example EMF Model Creation
> > Wizard to create the UML model (here; as reported I get the same problem
> > with programmatically generated UML files).
> > In this case, I only stay within the editor, and there is no (separate,
> > on-disk) Ecore model (except the UML models in-memory representation).
> > There's also nothing in the Error Log, and I just checked with a fresh
> > Classic Helios and only installed the UML2Extender.
> >
> > This is the trivial model.uml (never mind the line breaks). :
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <uml:Model xmi:version="2.1"
> > xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> > xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML"
> > xmi:id="_89dnMI6MEd-MxvZKuoG_jg" viewpoint="">
> > <packagedElement xmi:type="uml:StateMachine"
> > xmi:id="_-hY4EI6MEd-MxvZKuoG_jg">
> > <region xmi:id="__yf6oI6MEd-MxvZKuoG_jg">
> > <transition xmi:id="_ArWOMI6NEd-MxvZKuoG_jg">
> > <trigger xmi:id="_Ba40wI6NEd-MxvZKuoG_jg"/>
> > </transition>
> > </region>
> > </packagedElement>
> > </uml:Model>
> >
> > Should this better go to one of the UML groups?
> >
> > Volker

--
United Nations University -
Previous Topic:[CDO] Query
Next Topic:Composition, Aggregation relationship to containment
Goto Forum:
  


Current Time: Thu Apr 25 23:22:44 GMT 2024

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

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

Back to the top