Sometimes the data you are looking for is a little buried. This is especially true when looking at either end of a connector between ports. In SysML and UAF we need information from the end points to fill in data for an Interface Control Document(ICD). We have an ICD table, but it is not very editable, so we often create a GenericTable and add Custom Columns. In this example, I show how to do this in UAF, but it is similar to plain SysML.
In this use case, we have a ResourceExchange where it is important to understand the measurement data of the ResourceRoles. Here is the ResourceInternalConnectivity Diagram showing the two roles with their measures.
The GenericTable type is ResourceExchange, so we need to navigate using a Metachain query. Here is the query. Note that this query requires changing the Type to slot. The creation of the steps in the chain also requires changing the result type (the first column) to specific types as needed. By changing to the specific type, the second column has the appropriate property that type has available. Changing the first column of the Metachain is not always obvious. The tool will also often select a very abstract type, so you won't see the specific properties until the change to the correct metatype of the result is specified.
This is the Receiving measure, which can be created with a simple Edit->CopyWhole to another custom column. The Property of the exchange, 'Source' is changed to Target and the name of the column is also changed.
Here is the final Table of the example with the custom columns:
A secondary issue to be aware of is the type of the Metachain (in this case, 'Slot'). If the type is incorrect, then the query is run, but the filtering of the type will exclude your result. The Metachain tries to get the correct type, but often with longer chains it gets confused, so always double-check that the type is set to the kind of element that is the last property of the chain. If you create a query that results in a blank column, try the 'Evaluate' function and test the query. The result has an annotation of the type as can be seen in the example below. This is a little misleading as the real type is the property type which is Slot. Slot has a property Value which is a collection of 0..* instances. In this case, the tool can display the collection of items in the Value property without further chabges
Here is the view of the Slot using the Evaluation editor.
Here is an example where we continue the Metachain to Value. Note also that the Type of the result is set to InstanceValue. Note that the stereotype is also missing from the result in the evaluate.
The last column in the following table shows the instance directly. This may be desirable if you need only the instance rather than the slot that automatically displays the stereotype and the value.
QuerryDialogGenericTableMetachain
Here is the example model (Uses 2024 System of Systems)
