Customizing the metamodel > Diagrams: Creating and modifying > Creating box-in-box diagrams
  
Creating box-in-box diagrams
System Architect can support box-in-box diagrams on the basis that underlying references between definitions will be updated on adjusting node symbols to contain or not contain other node symbols. Embedding a node symbol in another has the effect of populating a reference property from the embedded definition to the embedding definition. Likewise, changing a diagram so that a symbol is no longer embedded has the effect of removing the reference to the old embedding item. A property can be defined to allow the user to turn off the behavior: see below.
System Architect does not auto-build box-in-box diagrams from definitions. This is because in most cases users can be expected to have carefully laid out diagrams and the existing diagram layout would have to be destroyed to achieve this.
Instead inconsistency errors are displayed, and you can run a report from the Report menu to hide them or to get an explanation of the embedding behavior.
To suppress refreshing of the inconsistency indicators
To suppress refreshing of the inconsistency indicators, use the following diagram property. Here it is defaulted to ‘F’, so that if you start with a new diagram, they would not appear at all until shown using the command on the Reports menu.
PROPERTY "Auto-refresh box-in-box inconsistency indicators" {EDIT BOOLEAN DEFAULT "F"}
Implicit relationships
SYMBOL "type name"
{
REPRESENTS IMPLICIT RELATIONSHIP "definition1"."property1"
...
REPRESENTS IMPLICIT RELATIONSHIP "definitionn"."propertyn"
ASSIGN TO "diagram1" EMBEDDEDBY
...
ASSIGN TO "diagramn"
}

DIAGRAM “diagramn”
{
PROPERTY "Auto-populate implicit relationships"
{ EDIT BOOLEAN DEFAULT "T" LABEL "Auto-populate implicit relationships on moving symbols"
}
}
This example says that the symbol represents an implicit relationship as normal (which specifically identifies the source definition and property).
It says to apply EMBEDDEDBY behavior for all specified references on a particular diagram type.
When a diagram of this type was open, there is no option for this symbol type on the Draw toolbar.
This is supported in the SaUserProp generator with a separate list of diagrams for which the symbol was assigned, with embeddedby behavior.
This is a more complete example:
DEFINITION "Organizational Unit"
{
PROPERTY "EmbeddedIn" { EDIT ONEOF "Organizational Unit" }
}

RENAME DIAGRAM "User 1" TO “A”

DIAGRAM “A”
{
PROPERTY "Auto-populate implicit relationships"
{ EDIT BOOLEAN DEFAULT "T" LABEL "Auto-populate implicit relationships on moving symbols" }
}

RENAME SYMBOL "User 1" TO "OU-OU"
RENAME SYMBOL "User 2" TO "OU"

SYMBOL "OU-OU"
{
REPRESENTS IMPLICIT RELATIONSHIP "Organizational Unit"."EmbeddedIn"
ASSIGN TO A EMBEDDEDBY
}

SYMBOL "OU"
{
DEFINED BY "Organizational Unit"
ASSIGN TO A
}
Notes
For node user symbol types you are only just starting to use, meaning you are adding a RENAME "User n" statement for this purpose: to get the full benefit of representational consistency such as removing symbols when the definitions are removed, use the REPRESENTS NODE keyword instead of DEFINED (BY).
Listof-type references are supported.
Explicit relationships
You can employ Explicit Relationship definitions to support box-in-box relationships. The direction of the relationship is the same; from the embedded item to the embedding item.
Taking example from DoDAF2:
FROMDEF and TODEF references and RELATIONSHIP specification:
DEFINITION "ActivityPerformedByPerformer (DM2r)" RELATIONSHIP LABEL "activityPerformedByPerformer" REVERSELABEL "performerPerformsActivity"
{
CHAPTER "Activity and Performer"
PROPERTY "Activity"
{ EDIT HETEROGENEOUSONEOF "Activity (DM2)" AND_SUBTYPES ASGRID FROMDEF
DISPLAY { FORMAT ListNameOnly LEGEND "Activity" }
SHOW_ON_INSTANCES
}
PROPERTY "Performer"
{ EDIT HETEROGENEOUSONEOF "Performer (DM2)" AND_SUBTYPES ASGRID TODEF
DISPLAY{ FORMAT ListNameOnly LEGEND "Performer" }
SHOW_ON_INSTANCES
}
}
Enabling property involving type number of relationship definition:
In the following example, 1380 is the definition type number. The symbol type number can also be used.
DIAGRAM "OV-05b BPMN Operational Activity Model (DM2)"
{
Property "Auto-create/update 1380"
{ Edit Boolean
DEFAULT "T"
LABEL "Auto-create/update ActivityPerformedByPerformer definitions on moving symbols"
HELP "Populates Activity, Performer references"
}
}
Assigning a symbol that can represent the definition type to a diagram using the EMBEDDEDBY keyword:
SYMBOL "activityPerformedByPerformer (DM2r)"
{
REPRESENTS EXPLICIT RELATIONSHIP "ActivityPerformedByPerformer (DM2r)"
Assign To "OV-05b BPMN Operational Activity Model (DM2)" EMBEDDEDBY
}
Note For node user symbol types you are only just starting to use, meaning you are adding a RENAME "User n" statement for this purpose: In order to obtain the full benefit of representational consistency such as removing symbols when the definitions are removed, use REPRESENTS NODE instead of DEFINED (BY).
See also
Diagrams: Creating and modifying