SysML/UML: MagicDraw/Cameo: GOTCHA: Connecting a typed OutputPin to an untyped (UNSPECIFIED) InputPin with an ObjectFlow changes the type of the InputPin

Icon class
far fa-sticky-note
far fa-sticky-note
Note kind
Policy level
Specification keywords
UML keywords
SysMLv1.x keywords
Click on the image to view it full size

In MagicDraw® UML, the MagicDraw SysML Plugin, and Magic Cyber-Systems Engineer ® (Cameo Systems Modeler®) there is the concept of an UNSPECIFIED type, but it is not the equivalent of a "match all"!

If you connect a typed OutputPin to an untyped (UNSPECIFIED) InputPin with an ObjectFlow it changes the type of the "target" InputPin.

In some cases this is desirable behavior, but not always. For example, it can make it difficult to have Behaviors that represent common mathematical operations that should apply to many types. If you connect in a usage (CallBehaviorAction) in one Activity usage context, it can change the underlying Parameter type, so that it is no longer compatible with usages in other contexts.

As a result, you can end up with an explosion of small Behaviors for representing common maths operations for each combination of parameter types (especially if you wish to go beyond just using the SysML Real, such as when trying to model the Mathematica Quantity).

There are many other circumstances where "connecting" to an element of UNSPECIFIED type causes its type to "upgrade" automatically.

Compare this behavior with the Blank _ of Mathematica, which matches any expression:

But working with SysML Parametrics models of Mathematica equations and functions is easier:

Luckily this change of type does not happen when you connect a BindingConnector from a typed ConstraintParameter to an untyped one
Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)