0

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

Geert Bellekens
  • 12,788
  • 2
  • 23
  • 50
TimSa
  • 3
  • 2

1 Answers1

1

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.

Axel Scheithauer
  • 2,758
  • 5
  • 13
  • Thanks, What would you think about using realization relation between the instance specification and the property, to express that the property is simply a "reference" of the instance? – TimSa Mar 17 '23 at 22:18
  • Is that possible in EA? Whatsoever, it doesn‘t have the intended semantics. Would it be useful, to fake the relationship this way? My suggestion has the advantage of at least looking correct. – Axel Scheithauer Mar 24 '23 at 11:27
  • your suggestion is ideal for the diagram, but I'm intending to integrate EA with other tools using xmi, where I will need some sort of connection between parts and instance specifications. I'm not sure if a realization dependency between the part and the instant specification is the right semantics or not, EA doesn't allow a connection between a part and an instant specification, just a realization. if we want to establish a relationship between (part1: Block1) and (myBlock/part1: Block1) what would that be in your opinion, would a Realization in this case be not the intended Semantics? – TimSa Apr 03 '23 at 07:09
  • In UML there would be no direct relationship between `part1:Block` and `myBlock/part1:Block`. The relationship is that the instance specification `myBlock/part1 – Axel Scheithauer Apr 10 '23 at 10:51
  • In UML there would be no direct relationship between `part1:Block` and `myBlock/part1:Block`. The instance specification `myBlock/part1` would be a value in the slot for `part1` of the instance specification `mySystem`. I was not able to do that in Enterprise Architect. Maybe there is no other way, than to fake it somehow. However, it should always be a relationship between instance specifications. Otherwise, how do you model, that you have two different instances of type `Block1`, one being a part of `mySystem1` and the other of `mySystem2`. – Axel Scheithauer Apr 10 '23 at 11:00