file OCL

3 years 6 months ago - 3 years 6 months ago #3892 by asefth
Hi

can you guide me (us) for just cleanly and simply creating a constraint between two elements?
I've been trying the Notes and constraints tab, selecting two associations (two classes are individually associated to on class), and then choosing "Xor". But the Xor is only linked to one association.


I tested with various cardinalities. Same result: only an association has the Xor constraint.

I remember that there are at least two ways of doing that.

BTW, four years ago, you answered that Modelio did not fully support OCL:
Can Modelio support OCL ?
And now?
What is the OCL support from Modelio? (edit constraints, import/export constraints in XMI).

Thanks
Regards
Attachments:

Please Log in or Create an account to join the conversation.

3 years 6 months ago #3893 by pan
Hi,

To create a constraint between 2 elements :
- Select the constraint from the diagram toolbar
- Click on the first element
- Click on the second element
- Click on an empty space



Hope this helps.
Attachments:

Please Log in or Create an account to join the conversation.

3 years 6 months ago - 3 years 6 months ago #3894 by asefth
Hi,
Yes, it's clearer.

I can name this constraint "Xor" instead of "myconstraint" as you did.
Is it ALL what is required to correctly express a Xor constraint between two elements? (i.e. the string "Xor" in the 'body' field)

I mean, if I export my model (XMI) will it appear 100% clear to the reader that there is a self explanatory/non ambiguous Xor constraint?




It seems stupid and useless to open Constraint Edition window (by double clicking on the created {:} ), then select 'Notes and constraints' tab, then select Xor. It looks like "pasting another label on a constraint"

Can you explain in wich situation the Notes and constraints Tab/ the Constraint Edition window should be used?

Can we say that all OCL is supported by Modelio?


Thanks
Regards
Attachments:

Please Log in or Create an account to join the conversation.

3 years 6 months ago #3903 by asefth
Hi,
can you pls. guide me to the relevant information about OCL in Modelio?
I don't really find OCL stuff on the websites.

At a certain point, I/we need to specify constraint to create a useful model (Constraint is a class within UML metamodel!)
Should you not recommand OCL, how do you specify constraints within Modelio?

Thanks
Regards

Please Log in or Create an account to join the conversation.

3 years 5 months ago #3920 by andy
You may model constraints as you did for XOR.

Modelio doesn't support OCL, but you may program consistency checks as well as any other queries or transformations with Jython or Java.

Cheers

Please Log in or Create an account to join the conversation.

Moderators: tmaebr
Time to create page: 0.404 seconds
^ Back to Top