Using Property values

Hi,
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?
    Regards,
    Jérôme

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

Hi Jerome & Stephane,
I’m experiencing some errors in my model about property values… I use them in two circumstances:

Configurations: Then I have set up value groups to describe the attributes, each item in the model affected by the attribute gets the value group: components; capabilities; modes; states. Then I set under the group the different values for the attribute. I give the value the model item applies only when the system feature include the attribute value. I tried to use the enumerated value types and literal, but this raises errors when checking with the tool.

The other use is coming from my system exchanges which are quite diverse. So I have set groups to describe type of exchange items. Each includes three values refering to literals. First is exchange class :Material/Energy/information/picture (I have a screen for which I have to describe displays); Physical domains (Mechanics/Electricals…Digital) and last one about relation to time: amount; rate or rate variation. In this organisation, values are group to constitute a master attribute value and not the attribute list. But again I still have an error about the reference to literal: “Value cannot refer to literal”.
The error is an integrity one: so I think I will remove the reference again… and find another way to check exchange consistancy…
Thanks for any remark or ideas
Regards
Thierry Poupon

Hi Thierry,
Just FYI, Jerome and Stephane are not going to be notified here as this thread has been migrated from the former Polarsys forum.
Stephane

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