[solved] Understanding Validation errors [message #1272811] |
Tue, 18 March 2014 20:58 |
Ali Ghorashi Messages: 20 Registered: July 2009 |
Junior Member |
|
|
Dear Papyrus wizards,
What is a good resource for understanding model validation errors in Papyrus? I'm even willing to read source code to understand what some of these errors mean.
For example, I'm getting the following error:
The opposite features 'activity' of '<Expansion Region> for each server' and 'node' of '<Activity> Activity1' do not refer to each other
I have searched through the UML2 spec, several UML2 books, and the internet but I'm still very confused.
Any help would be appricated.
-Ali
[Updated on: Fri, 21 March 2014 19:28] Report message to a moderator
|
|
|
Re: Understanding Validation errors [message #1272817 is a reply to message #1272811] |
Tue, 18 March 2014 21:05 |
|
Hi, Ali,
This is a basic EMF-level constraint on the consistency of
bidirectional references. Essentially, it indicates that your model
has an Activity and an ExpansionRegion that are associated by the
bidirectional activity/node references, but one of these objects does
not actually reference the other. So, the bidirectional association is
broken.
You can see this implemented in the EObjectValidator class, the
validate_EveryBidirectionalReferenceIsPaired method.
HTH,
Christian
On 2014-03-18 20:58:40 +0000, Ali Ghorashi said:
> Dear Papyrus wizards,
>
> What is a good resource for understanding model validation errors in
> Papyrus? I'm even willing to read source code to understand what some
> of these errors mean.
> For example, I'm getting the following error:
> The opposite features 'activity' of '<Expansion Region> for each
> server' and 'node' of '<Activity> Activity1' do not refer to each other
>
> I have searched through the UML2 spec, several UML2 books, and the
> internet but I'm still very confused.
>
> Any help would be appricated.
>
> -Ali
|
|
|
|
Re: Understanding Validation errors [message #1274385 is a reply to message #1273979] |
Fri, 21 March 2014 11:55 |
|
Hi,
By all means, attach your model.
You should see in the XMI that either
(a) the "for each command" LoopNode element has an 'activity 'attribute
referencing the ID of the "Activity 1" Activity element but "Activity
1" does not have a 'node' attribute or element referencing the ID of
"for each command", or
(b) the "Activity 1" Activity element has a node attribute or element
referencing the ID of the "for each command" LoopNode but "for each
command" does not have an 'activity' attribute referencing "Activity 1"
In the UML metamodel, ActivityNode::activity and Activity::node are two
navigable ends of an association, so they are "opposites". In a valid
model, every activity and node that are thus associated must reference
one another. This is evidently not the case in your model.
HTH,
Christian
On 2014-03-20 20:50:18 +0000, Ali Ghorashi said:
> Thanks Christian,
> I'm still confused. I have attached a copy of my activity diagram which
> has the following error:
>
> the opposite features 'activity" of <loop Node> for each command' and
> node of '<Activity> Activity 1 do not reference each other.
>
> I am at a comlete loss. I can attache the model if that helps as well.
>
> Thanks for your help.
> <image>
|
|
|
|
Re: Understanding Validation errors [message #1274631 is a reply to message #1274560] |
Fri, 21 March 2014 19:09 |
|
Hi,
The attached tar.gz file was was corrupt and I couldn't get the *.uml
file out of it.
But, I reproduced your problem in a minimal activity model of my own.
This is a bug in the Eclipse UML implementation:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=430907
The implementation of these association ends in the UML metamodel is broken.
You can work around this, for now, by explicitly adding the LoopNode to
your Activity's 'node' property using the Advanced tab of the
Properties view. Click the "..." button in the Node property and add
your LoopNode from the left.
The Papyrus diagram editor created the LoopNode in the Activity::group
feature (not Activity::node), which I think makes perfectly good sense
because a LoopNode is a group (which is a more specific concept than a
node). But the UML implementation needs to make sure that
Activity::node is updated, too, as the opposite of the
ActivityNode::activity feature.
HTH,
Christian
On 2014-03-21 16:36:43 +0000, Ali Ghorashi said:
> Christian,
> Thanks for help and patience. Now I understand what the error means but
> I'm still at a loss as to how to fix it. I must have read over your
> response 10 times trying to match your explanation to a field/attribute
> in either the expansion node or activity in Papyrus.
>
> I have attached my model and would appreciate any hints or suggestions.
>
> Thank you
>
>
>
>
> <image>
|
|
|
|
Re: Understanding Validation errors [message #1274640 is a reply to message #1274636] |
Fri, 21 March 2014 19:20 |
|
Hi, Ali,
Hmm ... maybe there's some funky UU-encoding going awry in the usenet
news server (I don't use the forum's web interface). Anyhow, I'm glad
you're back on track.
Sorry, I don't do any activity modeling, myself, and don't know what
expansion nodes/regions are intended for.
Christian
On 2014-03-21 19:17:56 +0000, Ali Ghorashi said:
> Christian,
> That's strange. When I download the file from the forum posting, it
> opens up fine.
> But that doesn't matter. Adding the node using the advanced tab worked
> like a charm.
> Now, if I can figure out this expansion node problem
> (http://www.eclipse.org/forums/index.php/t/673814/) I'll be a happy
> camper. Do you have any experience with expansion nodes and expansion
> regions?
>
> You've been a great help.
>
> -Ali
|
|
|
|
Powered by
FUDForum. Page generated in 0.06420 seconds