Instances with value-carrying Slots

Gallery
Tutorial
Click on the image to view it full size

The terms object and instance tend to get thrown around rather loosely, and we are not going to concern ourselves with the possibly academic difference between them here. We're only interested for now in representing values. All we need to know here is that an object an instance is represented in UML and SysML by an InstanceSpecification:

And it's worth noting that an InstanceSpecification does not just have one Type (it is not even a TypedElement) it can have more than one Classifier, and they can even change during its "lifetime" (although in the example shown only one is BlockWithValues is assigned): The values carried in Slots, which correspond with StructuralFeatures (which if we are interested in values in SysML just means the value properties of our block): Note also, there is no obligation to populate every Slot - even if the multiplicity of the corresponding StructuralFeature suggests it is required - because an InstanceSpecification may be used for a partial representation of an instance (as and when needed):

We've actually already seen some instances with Slots in a previous slide, and as before, we see that the values of the Slots, which initially take any defaults defined on their corresponding value properties, can be overridden.

Under the hood the values are carried by a ValueSpecification, but in practice in the tool, if you are just dealing with numerical engineering values and strings, you don't usually have deal with that, the tool usually does a pretty good job of just letting you enter values as you'd expect.


In the tool InstanceSpecification available under the diagram sidebar menu items as 'Instance'. This power tip can save you a lot of time:
Up next
Notes
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (includes other tutorials)
Related slides (backlinks, includes other tutorials)