Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Model Validation warning: One or more parameters of behavior do not match
Model Validation warning: One or more parameters of behavior do not match [message #1840587] Tue, 20 April 2021 01:40 Go to next message
Jeremy Hillford is currently offline Jeremy HillfordFriend
Messages: 5
Registered: April 2021
Junior Member
Hey all,

I've been getting a model validation warning that I haven't been able to resolve. In trying to debug it I've isolated it in a basic project (project layout viewable in attachments).

I'm trying to create a class that declares an operation which accepts an integer, and I'd like to refine this operation using an interaction (sequence diagram.)

Right now I've got a class, "testClass", with an operation "test_op1". The operation has a parameter "test_int" that is typed as "<EDataType> Integer". For this operation, I've defined the method as an Interaction, "test_interaction". At this point, when I run the validation I'm getting the warning "One or more parameters of behavior 'model:testPackage:testClass:test_interaction' do not match.", however, I don't see a way to add parameters to the interaction from the properties view.

To try to solve this, in the interaction I've added a lifeline (representing the testClass), and created a message_sync with the signature of test_op1 and an argument as literalInteger, but that didn't seem to work.

I'm a bit new to papyrus and UML modeling in general. If I've missed something or if there is more information needed just let me know, and I appreciate any help that is provided.

Thanks
Re: Model Validation warning: One or more parameters of behavior do not match [message #1840600 is a reply to message #1840587] Tue, 20 April 2021 13:01 Go to previous messageGo to next message
Christian Damus is currently offline Christian DamusFriend
Messages: 1270
Registered: July 2009
Location: Canada
Senior Member

Hi, Jeremy,

You can create a parameter in your interaction behaviour using the "New Child" context menu in the Project Explorer. Then you can set this parameter as the element represented by a lifeline, as shown in my attachment.

HTH,

Christian
Re: Model Validation warning: One or more parameters of behavior do not match [message #1840605 is a reply to message #1840600] Tue, 20 April 2021 15:10 Go to previous messageGo to next message
Jeremy Hillford is currently offline Jeremy HillfordFriend
Messages: 5
Registered: April 2021
Junior Member
Hey,

Thanks for the reply! I added the input parameter and created a lifeline for it. However, I'm still getting the model validation warning. Is there something else I need to do to fix the warning?
Re: Model Validation warning: One or more parameters of behavior do not match [message #1840611 is a reply to message #1840605] Tue, 20 April 2021 16:34 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

"do not match" usually (but not always) means does not match rather than is missing; i.e. a Type error rather than a Count error.

If you have a troublesome *.uml file, you need to attach at least that *.uml file so that we can investigate.

Regards

Ed Willink
Re: Model Validation warning: One or more parameters of behavior do not match [message #1840614 is a reply to message #1840611] Tue, 20 April 2021 16:54 Go to previous messageGo to next message
Jeremy Hillford is currently offline Jeremy HillfordFriend
Messages: 5
Registered: April 2021
Junior Member
Ah, got it. I've attached the uml file to this message
  • Attachment: model.uml
    (Size: 1.72KB, Downloaded 62 times)
Re: Model Validation warning: One or more parameters of behavior do not match [message #1840620 is a reply to message #1840614] Tue, 20 April 2021 19:15 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

There appears to be nothing wrong with the *.uml; certainly nothing to demonstrate your problem.

Quote:
you need to attach at least that *.uml file so that we can investigate


A zipped project is generally more comprehensive together with a copy of the Eclipse configuration from Help->About Eclipse->Installation Details->Configuration.

Regards

Ed Willink
Re: Model Validation warning: One or more parameters of behavior do not match [message #1840623 is a reply to message #1840620] Tue, 20 April 2021 19:56 Go to previous messageGo to next message
Jeremy Hillford is currently offline Jeremy HillfordFriend
Messages: 5
Registered: April 2021
Junior Member
Sure thing. I appreciate the help!
Re: Model Validation warning: One or more parameters of behavior do not match [message #1840660 is a reply to message #1840623] Wed, 21 April 2021 14:19 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Using your project I am able to see similar things using 2021-03.

But, disclaimer, I have only ever used interaction diagrams many years ago whil reverse documenting. My comments may therefore be completely wrong and my intuitive usage of papyrus inappropriate....

I am surprised that the *.uml has no trace of any messages; IMHO the *.uml should have 100% of the model content and so any model discrepancy should show up in UML validation.

Oops just tried again. UML validate does indeed show the warning. Far from helpful but it does tell you that an Interaction Parameter does not match its Operation parameter. For which you have exactly one Integer valued parameter for both but differently names input/test_int. If you change test_int to input the problem goes away.

So yes one or more parameters do not match. (An unhelpful diagnostic, and a very bad metamodel IMHO names should never be duplicated; it just gives so many opportunities for typos particularly under maintenance.; the Interaction should reference rather than pun the Operation parameter.)

Regards

Ed Willink
Re: Model Validation warning: One or more parameters of behavior do not match [message #1840667 is a reply to message #1840660] Wed, 21 April 2021 15:58 Go to previous message
Jeremy Hillford is currently offline Jeremy HillfordFriend
Messages: 5
Registered: April 2021
Junior Member
Ah! Thank you for looking looking into that! I hadn't even thought to change the name of the parameter because I figured having identical names would be bad practice (glad to see I'm not alone in that opinion.)

Little disappointed it was such a basic oversight on my part, but I really appreciate your help on this!
Previous Topic:Stereotype deleted during model merge
Next Topic:[Table] How to put elements in a Relationship Generic Matrix?
Goto Forum:
  


Current Time: Tue Apr 23 16:37:08 GMT 2024

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

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

Back to the top