Dr Darren's MagicDraw UML and SysML Plugin eSchool
Motto: "Learn good ways to work with MagicDraw UML and its SysML Plugin !"
About the eSchool
UML2 in MagicDraw
MagicDraw UML tips
MD SysML Plugin
MagicDraw for Java
MagicDraw for XML
Advanced UML and SysML Training

HOWTO progressively configure the initial values of Blocks reused as part Properties


Motto: a system with no values has no value !


We will consider the progressive re-use and re-configuration (or initialisation) of values of blocks used as part properties in various types of vehicles, including inherited configurations. By progressive I mean "one context at a time", as opposed to deep re-configuration of all values of an entire system (which is the subject of another advanced trail).

We will distinguish between the following types of configuration values:

  • Static (or class-level) default values: These correspond to the values one would get using a noargs constructor (see the capacity value of the FuelTank block below). If not overridden on instantiation of the block these become the initial values. They are managed by the Block that owns the ValueProperty.
  • Property-specific initial values (a.k.a. property-specific default values): these are specific to the usage of a Block in a higher context (by a structured block or "assembly"), and if there are many part properties of the same type, they may have different property specific initial values. They are managed by the higher context structured block that owns the part properties, which initialises or configures their (possibly different) values on instantiation. In our example an abstract Vehicle block will configure/initialise a tank:FuelTank part property with a new capacity value.
  • Inherited property-specific initial values: a concrete Car (with 4 wheels) that simply extends Vehicle will inherit the property-specific initial values of the any Vehicle, i.e. when a :Car is instantiated it will initialise its tank:FuelTank to the same new capacity value (overriding the static default value from FuelTank)
  • Redefined property-specific initial values: a TouringCar extends Car to add a RoofRack and to specify a larger tank:FuelTank (presumably for long trips). When a :TouringCar is instantiated it will re-initialise its inherited tank:FuelTank with a larger capacity value (overriding the property-specific initial value of tank:FuelTank within Vehicle).

Let us now work through these cases to see how they are assigned and managed in MD SysML

Image: 
Search
The MagicDraw SysML Plugin Tutorial Overview