umlconceptual-model

Conceptual model with a constraint


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


Solution

  • 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? 😉