Automatically calculated property values or attributes

Is it possible to extend properties to be calculated automatically from other elements values and characteristics?

Example: I’d like to cascade a criticality enumeration property from functional chains to the applicable functions, components and exchanges in such a way that:
1-Criticality property is editable for the functional chain
2-Criticality is cascaded automatically from the highest criticality functional chain ‘applicable’ to the element in question and, when criticality is cascaded, it is not editable.

E.g.: FC1 and FC2 refers to Functions F1 and F2 that are allocated to Logical Component LC1.

If FC1 has criticality set to: HIGH and F2 has criticality set to MEDIUM, the criticality of F1 and F2 and LC1 are set to HIGH automatically.

If FC1 critically is changed to LOW, F1, F2 and LC1 criticality should be calculated to MEDIUM

What would be the best (simplest) Capella customization strategy capable of delivering this behavior? Some extension to PVMT? A dedicated viewpoint? A Capella plugin?

If property values are not the best way of using/applying such attributes I’d welcome any suggestion on alternatives.

Thanks for any insights into this

I second that! This could be some (small initial) step towards SysML parametric diagrams functionality! :slight_smile:

1 Like

Hi Fábio,

Yes, it’s feasible. But anything is possible when it comes to customization. :wink:

In your example, adding new properties would be easy with PVMT but the propagation rules seem to me slightly too complex.
I would advise creating a specific viewpoint by using Capella Studio. You can draw inspiration from the Basic Mass example since it includes a property whose value depends on the property in the sub-elements.


I would say that it’ a nice application for EMF derived attributes.
It’s such attributes that are calculated based on other elements attributes and that can’t be edited.

Property Values criticality can be used to set values for FunctionalChanins.
New attribute (criticality) can be added to functions using extension mechanism and calculated based on all functional chains where functions is involved. Mass viewpoint is an example how to add such new attribute

To calculate this attribute in real time VIATRA can be used or Java code.
Capella actively use VIATRA to calculate a lot of derived references.

Thanks for the replies. I will try to start a project on Capella Studio as a personal project based on the mass viewpoint to see if I can customize it… I haven’t found many mentions of VIATRA within the Capella Studio help pages (only a comment in a release note). Is it somehow included in Capella Studio? How do I use it?

You can start from using OCL or Java code to define derived features.
and only after you will result in slow performance with big models go to the VIATRA

As I understand VIATRA SDK is not included into Capella Studio.

about Viatra derived fuature support you can read here

Mass viewpoint example use Kitalpha DSL for viewpoint development and generates a lot of projects.
You can start from easy ecore model on which to generate emf.model and emf.edit
You need to use generationchain to generate code for Capella based on ecore model.

You can find an example how to add new elements into Capella in my repo

Thank you! I’ll check it out! I think I’ll need to invest some time in getting familiar with the toolchain to be able to do something useful with it…

You can also just try capella-groovy and run a script to update your property values whenever you need to.

Hello @FDorner,

is there already a capella-groovy für Capella-5.0?

Kind regrads

Not yet, but maybe soon I can look at it.

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