enterprise-architectsysml

creating Nested Instance Specification in Sparx Enterprise Architect


In Sparx Enterprise Architect I'm trying to replicate a diagram from a book. I'm facing a problem connecting instance properties to instances that they represent or correspond to.

Diagram from Practical guide to SysML Diagram from Practical guide to SysML

My Diagram

My Diagram.

Does Sparx EA support having instances as properties of other instances as shown in the diagram from the book, if yes, does anyone know how?

I tried allocation which also doesn't work from property to object. I'm trying to get to describe the configuration of the block with instances, but the description as in the following sentence is not working

from Practical guide to sysml from Practical guide to sysml


Solution

  • Most tools don't support this notation. However, it is easy to fake: Just name the instance specification accordingly and move it into the rectangle of the owning instance specification.

    enter image description here

    Of course, this has some limitations. The role name will not get updated when you change it in the System1. It is merely a string. I was also not able to define that the myBlock instance belongs to the mySystem instance. Maybe, there is a way, but I was not able to find it, even though I have some experience with Enterprise Architect. Since the number of object diagrams needed is usually small, these limitations might not be a big problem.

    Now, Enterprise Architect does support a notation, that resembles a little bit, what the specification says:

    enter image description here

    However, this is complete nonsense. The myBlock element is not an instance specification, but a "property" (therefore it is not underlined). As such it cannot have slots for its own values (as shown in the first example). It makes me speechless how Sparx just ignores the UML specification and creates utter confusion.

    In your example you show tags. I'm not sure what you want to do with them. However, please note that they cannot be used to describe the modeled system. They are on the language level and describe language concepts.

    There is no constraint on the elements that can be connected by an allocation. Enterprise Architect is a little confused by different kinds of what it calls "property" and it is in fact not possible to draw one between "properties" shown in an instance specification and another instance specification. Even if it were possible, it would not have the intended semantics.