Here we examine an advanced SysMLv1 topic, the gory details of ParticipantProperty, and learn exactly why it is needed to support AssociationBlocks.
Firstly, note that "association block" is an informal term, there is no AssociationBlock stereotype in SysMLv1:
Our aim is to fully understand the following:
By default an AssociationBlock has member ends but no owned ends (as shown for AssociationBlock AB
between blocks A
and B
), which turns out to be significant.
If you look at the IBD for AB
it can display the "extra" ParticipantProperty items. But it doesn't have direct access in the IBD to a:A
and b:B
. Without the ParticipantProperty items, there would be no way of connecting anything up to represent sub-structure within a connection, which is the primary purpose of the SysMLv1 AssociationBlock.
An AssociationBlock can carry values, such as abVal
, which already offers some advantages. But the real action happens with you introduce additional parts for representing fine-grained sub-structure of a connection in a reusable way. The block Internal
and the part it:Internal
with AssociationBlock are used to demonstrate that here. Note also that the block Internal
can also carry values such as itVal
(which may have defaults), and it could itself have sub-structure.
Take some time to inspect how the Slots on the instances (including the Slots of the “link” instances typed by AssociationBlocks) not only carry specific values, but how those instances can then be used as defaults for properties within the other Blocks. For example, two different instances of Internal
are assigned to AssociationBlock AB
and CD
respectively, with the values displayed under the initialValues (aka context-specific values) compartments in the IBDs.
An AssociationBlock can then also be used to type a Connector:
Recommend NOT use AssociationBlocks with owned ends
So you might be asking: "What if you just let the AssociationBlock have owned ends? Then you could just use those in the IBD".
It turns out that Magic Cyber-Systems Engineer® (Cameo Systems Modeler®) does optionally offer to create an Association block with owned ends (as shown for AssociationBlock CD
between blocks C
and D
, but it not a good idea to use that owned ends approach, because it violates some SysMLv1 constraints and modelling rules.
Yes, you can then indeed show c:C
and d:D
in the IBD for AssociationBlock CD
, but if you connect them up you'll get a validation error in Cameo:
In fact, you already get a validation warning on the properties c:C
and d:D
: