Architecting and designing > SysML > Relationships > Association > Line Wizard for lines with Central node symbols
  
Line Wizard for lines with Central node symbols
Summary
This is facilitating drawing of a line comprising:
Source, Central and Destination nodes representing definitions.
Explicit Relationship Definitions linking the Source with the Central node and the Central node with the Target.
Central relationship definition linked by listof-type implicit references to source and target definitions.
User experience
Association Node and Lines line option on draw toolbar allows for reorganization of menus later and easy user access:
This graphic is described in the surrounding text.
Draw the line. Connections are restricted by symbol type:
This graphic is described in the surrounding text.
Name the line and press Enter in the usual fashion:
This graphic is described in the surrounding text.
Press Escape and the process is canceled, the line is removed.
Otherwise:
This graphic is described in the surrounding text.
If there are no conflicts (detailed later) … if as in this case we have multiple options of type the user is asked to select one:
This graphic is described in the surrounding text.
Press Cancel and the process is canceled, the line is removed.
Otherwise, press OK and the definitions are created and linked.
The Association definition receives the name the user entered.
The intermediary relationship definitions (Properties in this case) receive the names <entered name>-<From item name> and -<To item name> respectively:
The relationship node symbol is placed in the middle of the line with the name in the default position above the symbol.
The line depiction is set in accordance with the line direction and whether the line is horizontal or vertical at the point where the relationship node symbol is placed.
This graphic is described in the surrounding text.
A line point is inserted in the middle of the longest segment, so that we can determine how to set the direction property. Users can either move the node and reroute lines or just reposition only the name.
For this Association example, users still need to define whether the properties are owned by the Association or the Class. They will probably want to rename them anyway.
Note Definitions can be left locked for a while, we observe around 10 seconds.
This graphic is described in the surrounding text.
Drawing another line between the same two nodes:
This graphic is described in the surrounding text.
Regardless of the name entered, a ‘choices’ panel is displayed:
This graphic is described in the surrounding text.
Replying Cancel will stop at this stage, with the line being removed.
Replying Yes will cause a report to be presented:
This graphic is described in the surrounding text.
This has the benefit that users can select items to see details in the Property Pane, or double-click to open them.
The report will find multiple items, involving both Association and AssociationClass, for this Association example.
As described in the message, if you select and then click-and-drag from the Name or Type association cells to the diagram, you cause the Central node to be added and a restricted refresh is triggered which causes the lines to be added:
This graphic is described in the surrounding text.
If you drop a node in a position not facilitating a vertical or horizontal line, you just get diagonal lines. The user can select them to force them to be routed.
Replying No leads to a further verification as to whether the existing relationship definition should be reused:
This graphic is described in the surrounding text.
Replying Yes will present report output:
This graphic is described in the surrounding text.
Replying No leads to a further ‘choices’ panel being displayed:
This graphic is described in the surrounding text.
Replying No will create a new definition – because the items are GUID-keyed you get new, unique definitions which the user is free to rename.
Replying Yes will cause the user to be prompted to select the item to be updated. The user is shown the fully-qualified name of the item.
This graphic is described in the surrounding text.
Special behavior for associations – Part 1
For an association drawn between classes A and B:
Where Properties exist that are not owned by a class and which reference type A and they are not part of an association, they are offered for selection.
Where Properties exist that are not owned by a class and which reference type B and they are not part of an association, they are offered for selection.
For example:
This graphic is described in the surrounding text.
This graphic is described in the surrounding text.
Special behavior for associations – Part 2
In the scenario of creating an n-connections to n-connections relationship, adding to an existing binary:
This graphic is described in the surrounding text.
Members of the association that are reused will be offered for selection. The members do not need to be owned by the association as the message can imply:
This graphic is described in the surrounding text.
This graphic is described in the surrounding text.
Associating A with C after associating A with B causes creation of a duplicate association node symbol, which should be removed to reduce the number of lines the next refresh for representational consistency will add.
Running refresh results in this:
This graphic is described in the surrounding text.
You can select lines and hide them to clear this up, but the simplest thing to do is:
Remove the duplicate association node.
This graphic is described in the surrounding text.
This can then be neatened by straightening the horizontal lines and routing the other:
This graphic is described in the surrounding text.
Special behavior for associations – Part 3
For an association drawn between classes A and B:
Where Properties exist that are owned by class A and reference class B and they are not part of an association, they are offered for selection.
Where Properties exist that are owned by class B and reference class A and they are not part of an association, they are offered for selection.
For example:
This graphic is described in the surrounding text.
This graphic is described in the surrounding text.
For any selected property they are added as an association member.
Special behavior for associations – Part 4
If the Property to be reused is already part of an association, the operation is canceled and a message similar to the one below will be shown:
This graphic is described in the surrounding text.
See also
Line Wizard
Association Node to Class as Property
Association End to Stereotype as ExtensionEnd
Go up to
Association