Capella DataValues and Functional model

I am using data values in Capella to specify mapping rules between different
complex values structures. Now I am trying to understand how
how data values are interconnected with other capella elements:
functions, functional exchanges, functional ports, exchange items, sequense messages and so on.
Capella meta model for datavalues is quite good.
ComplexValues can be created based on class definitions.
PartValues can be created inside ComplexValue as class properties instances.
Simple values such as String Value and Numeric Value and can be used to set concrete valuse for String, Numeric properties.
Value references can be used to set value from other values.
Unary\Binary operations can be used to transform values.
Capella does not implement diagrams\tools to work with data values.
Class diagrams only shows them and nothing more.
I’ve implemented special sirius diagram and table representations that helps to create hierarchical data values based on class definitions.
This diagram\table view helps to create\analyze complex hierarchical data values and specify references between values in graphical way.
Now we can import classes from xsd (via ecore) to capella and create mappings between diferent data structures.
Now we want to integrate data values to functional capella sub model.
For example some function receives some complex data value on input and transforms it to another complex data value.
I need help to understand the correct way to do this in Capella.

Can we have a look at the Sirius diagrams/tables you developed? That would be nice.
The link between the data model and the functional analysis is based on some pivotal concepts:

  • Exchange Items have elements (Classes)
  • Functional Exchanges exchange Exchange Items
  • Function and Component ports have outgoing/ingoing Exchange Items
  • Components provides/requires Interfaces made of Exchange Items
    I suggest you to take a look to the following sections of Capella Help:
  • Interfaces and Data Modeling in Capella
  • Functional Analysis to Interface Engineering
    Hope it helps

I understands this all this concepts and use them in my models.
I am trying understand how to link DataValues (i.e. ComplexValue) to functional elements
using standard Capella meta model.
Now I can only add url to ComplexValues in function’s descriptions or element’s constraints.
I will publish examples of diagrams\tables in some time.

Data values can be added to Exchange Items using ExchangeItemInstance
– ExchangeItemInstance
------ classvalue : SomeClass
------------Value for str
------------------str = “Some string”
------ str : String
This links a datavalue to functional model.
But I assume that none of Capella diagrams show this ExchangeItemInstances.
Now I understand that I can add functions, functional exchanges, exchange items to our new diagram
and show a link from CamplexValues to FunctionalExchanges between functions.
Functional Exchange
------ ExchangeItem
------------ ExchangeItemInstance
------------------ DataValue
More over I think we can customize standard Data Flow Blank Diagrams (using Kitalpha viewpoints) and show DataValues with links to FunctionalExchanges.
It would be also nice to have a possibility to show ExchangeItemInstances on FunctionalExchanges the same way as ExchangeItems can be shown.
It would be nice to show ExchangeItemInstances for messages on sequence diagrams also.
Are my thoughts about this subject make sence?

The following screenshots are attached to this messages :

  • diagram example with data values\ references
  • table example with data values \ references
  • data value model in project explorer
    Ports on the diagram and lines in the table corresponds to DataValues elements of different kinds:
  • Complex Value
  • Complex Value Reference
  • Literal String Value
  • String Reference
  • Literal Numeric Value
  • Numeric Reference
  • Enumration Reference
  • Boolean Reference
  • Unary Expression Operand
    Edges on the diagram are based on the property referencedValue from References.

Now I have some problems with Sirius design plugin installation resulting in some problems with Sirius services.
In the table property “Ref Path” should show path to the referenced value.
for example for property it should be

There is possibility to copy DataValues to the following elements:

  • Function (property ownedDefaultValue)
  • Function Exchange (property ownedDefaultValue)
  • Function Port (property rate)
    What is the purpose of this properties?

I think it happens quite often that not everything that is possible via the Capella ecore model is actually meaningful. The Capella ecore model has always been very dynamic, the type hierarchy is complex. Sometimes, shortcuts are taken, and the thing becomes a bit sloppy. That is then overcome by embedding constraints in the application, so a good heuristic is to check what the UI allows. Yes, a Function has an ownedDefaultValue. But: Does the UI let you add an ownedDefaultValue to a Function? Nope. (Using drag/drop is cheating, very few constraints are actually implemented here! Use Add Capella Element… instead and see what the available options are). Another good indicator is the properties view. If something is only represented in the ‘Expert’ tab, it probably isn’t defined/exploited/useful.

Yes, I understand that meta-model can allow something that is not allowed in interface.
But in some times interface is developed later than meta model.
For example in Capella interface does not provieds many features that helps to work with hierarchical data values.
Although meta-model is quite good for this modeling. Nevertheless thanks for your answer!
What about exchange items instances. Any possibilities to work with them in Capella interface? wrote on Mon, 27 May 2019 12:59
Yes, I understand that meta-model can allow something that is not allowed in interface.
But in some times interface is developed later than meta model.
For example in Capella interface does not provieds many features that helps to work with hierarchical data values.
Although meta-model is quite good for this modeling. Nevertheless thanks for your answer!
It’s a gray, fuzzy zone… Sometimes, the metamodel allows stuff that’s not supported in the interface, but should be. Sometimes the interface prevents stuff that should actually be a constraint on the metamodel. wrote on Mon, 27 May 2019 12:59
What about exchange items instances. Any possibilities to work with them in Capella interface?
It rings a bell, someone else might know. I’d just look up references to the generated ExchangeItemInstance java class to see what gives.

Have discovered one more way to link data values with functional model.
Capella meta-model provides possibility to connect data values to sequence messages in scenarios.
In the functional scenraio it’s possible via popup menu (Add Capella Element)
to add “Sequence Message Valuation” element to the scenario’ Functional Exchange element.
With this element it’s possible to set value (data value) for exchangeItemElement of the ExchangeItem
associated with FunctionalExchange.
For different instances of Functional Exchanges in the scenario
it’s possible to set different values for exchangItemElement (input or output).
So different data values could be associated with different instances of functional exchanges.
I assume that scenrios is the right place to associate functional model with data values.
As I understand Capella interface does not support additional actions with this type of elements
and some customization is needed to work with this element from interface.

  • show data values for functional exchanges on sequence diagrams
  • create new property view for this type of element to constraint exchangeItemElemnts to
  • add validation rule that check that type of exchangeItemElement and data value is the same
  • publish links from sequence messages to data values in the output document (docx and html)

Unlike data flow diagrams, Scenarios (and Functional Chains) intend to describe specific how functions behave together in given contexts to fulfill system capabilities. So yes, they are the better suited place to set specific values to your Exchange Items.
Note that what you described is quite similar to Exchange Contexts. The “instances” of your Functional Exchanges (called Sequence Messages) may occur on specific context that you can specify by (i) double-clicking on the message, (ii) specifying the concerned Exchange Items and (iii) editing the Exchange Context field using a Linked Text expression on which you can invoke existing elements of your model (pressing control-space). Moreover, using the Exchange Context tool in the Palette, you can show the context in your diagram (cf. fig1).
Hope it helps.

Thank you for advice!
You are right my last description is near the same as “Exchange Context” functionality provides.
Now I am trying to use “Exchange context” to connect scenario messages with data values.
After my trials I will write about my results.
It’s convinient that the same constraints (as for exchange context) can be attached to other functional elements,
for example to functions or functional exchanges and visualized on the functional diagrams.

Scenarios (and Functional Chains) are used to describe specific usage contexts of the system.
Dataflow and architecture diagrams are not usage-context-specific - they are meant to remain valid on any context.
That is why you can define “Exchange Contexts” in Scenarios, i.e. define the expected values of exchange items in given specific situations described by the Scenarios.

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