4

I'm trying to make a conceptual model of this use case:

The Actor can modify the budget but after the modification the sum of all the budget elements percentages must be 100% or 0% if there are no elements in the budget.

How can I include this constraint in my model? enter image description here
The model can also be found here

Ionut
  • 1,729
  • 4
  • 23
  • 50

2 Answers2

3

You should just put a constraint on the contains property. In MagicDraw one can show the label for a constraint or the actual constraint in OCL.

Here is an example with the label only, which is probably more appropriate for the audience of a conceptual model:

enter image description here

Here is an example with OCL:

enter image description here

A little less readable, eh?

Jim L.
  • 6,177
  • 3
  • 21
  • 47
2

Simply attach the constraint like this to Budget

enter image description here

You can simply use a Note and put the constraint in curly brackets if your tool does not provide a native constraint element.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86