Using Property values

I want to use Property Values to give attributes to my functions in my model.
For example, functions may have a safety class, with the possible value 1, 2 or 3.
I tried two ways to give these attributes to my functions and I don’t know which one is the best :

  1. I create a “Property Value Package” with three “Integer Property Value” so in my package I have three elements : “Safety Class = 1”, “Safety Class = 2” and “Safety Class = 3”
    Then, I can apply the Property Value I want to my functions in the Extensions sheet.
  2. I directly apply the Property Value to each function by adding a Capella element to this function. In the Capella Project Explorer, the Property Value appears under the function.
    What is the best way to use the Property Values?

Both approaches are ok, there are many different legit ways to use Property Values. But in your case, it looks more like you should use an Enum Property Value. To optimize the number of elements in the model and the model maintenance, I would:
Create PV Package somewhere near a root element
Create an EnumerationPropertyType, in which you will define the different values of your enum
Create one Property Value for each literal
Reference these Property Values from the elements in the model
Notes: You don’t need the PropertyValueGroup we can see on this screenshot. To make PropertyValuePackage visible in the project explorer, you need to play the the filters (small button on the top right of the project explorer)

Thank you Stephane !
That’s exactly what I need and this is the easiest way

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.