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:
Draw the line. Connections are restricted by symbol type:
Name the line and press Enter in the usual fashion:
Press Escape and the process is canceled, the line is removed.
Otherwise:
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:
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.
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.
Drawing another line between the same two nodes:
Regardless of the name entered, a ‘choices’ panel is displayed:
Replying Cancel will stop at this stage, with the line being removed.
Replying Yes will cause a report to be presented:
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:
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:
Replying Yes will present report output:
Replying No leads to a further ‘choices’ panel being displayed:
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.
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:
Special behavior for associations – Part 2
In the scenario of creating an n-connections to n-connections relationship, adding to an existing binary:
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:
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:
You can select lines and hide them to clear this up, but the simplest thing to do is:
•Remove the duplicate association node.
This can then be neatened by straightening the horizontal lines and routing the other:
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:
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: