From 6a78441c2872282b2322643e43d5d37b8ba799fb Mon Sep 17 00:00:00 2001 From: beffge <88820893+beffge@users.noreply.github.com> Date: Fri, 3 Nov 2023 18:26:05 +0100 Subject: [PATCH] add View->AutoLayout->Implementation to mdl (#545) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add View->AutoLayout->Implementation to mdl * add View->AutoLayout->Implementation to everything else 😅🤞 * replace Implementation as dedicated function parameter with an own function * fixed whitespaces and unnecessary test * fixed missed reverts and formatting --- dsl/views.go | 54 +- expr/view_props.go | 20 +- mdl/eval.go | 11 +- mdl/views.go | 51 ++ stz/client_test.go | 1768 ++++++++++++++++++++++++-------------------- 5 files changed, 1105 insertions(+), 799 deletions(-) diff --git a/dsl/views.go b/dsl/views.go index de283273..6cce82da 100644 --- a/dsl/views.go +++ b/dsl/views.go @@ -16,6 +16,9 @@ type ( // RoutingKind is the enum for possible routing algorithms. RoutingKind int + // ImplementationKind is the enum for possible automatic layout implementations + ImplementationKind int + // RankDirectionKind is the enum for possible automatic layout rank // directions. RankDirectionKind int @@ -25,6 +28,13 @@ type ( // DynamicView. const Global = 0 +const ( + // ImplementationGraphviz indicates the automatic layout will be using Graphviz + ImplementationGraphviz ImplementationKind = iota + 1 + // ImplementationDagre indicates the automatic layout will be using Dagre + ImplementationDagre +) + const ( // RankTopBottom indicates a layout that uses top to bottom rank. RankTopBottom RankDirectionKind = iota + 1 @@ -1442,6 +1452,9 @@ func RemoveUnrelated() { eval.IncompatibleDSL() } +// DefaultImplementation sets tje default implementation for the auto layout. +var DefaultImplementation = ImplementationDagre + // DefaultRankSeparation sets the default rank separation for auto layout. var DefaultRankSeparation = 300 @@ -1451,8 +1464,9 @@ var DefaultNodeSeparation = 600 // DefaultEdgeSeparation sets the default edge separation for auto layout. var DefaultEdgeSeparation = 200 -// AutoLayout enables automatic layout mode for the diagram. The -// first argument indicates the rank direction, it must be one of +// AutoLayout enables automatic layout mode for the diagram. +// +// The First argument indicates the rank direction, it must be one of // RankTopBottom, RankBottomTop, RankLeftRight or RankRightLeft // // AutoLayout must appear in SystemLandscapeView, SystemContextView, @@ -1474,6 +1488,7 @@ var DefaultEdgeSeparation = 200 // SystemContextView(SoftwareSystem, "context", "An overview diagram.", func() { // AddDefault() // AutoLayout(RankTopBottom, func() { +// Implementation(ImplementationGraphviz) // RankSeparation(200) // NodeSeparation(100) // EdgeSeparation(10) @@ -1496,10 +1511,11 @@ func AutoLayout(rank RankDirectionKind, args ...func()) { } } layout := &expr.AutoLayout{ - RankDirection: expr.RankDirectionKind(rank), - RankSep: &DefaultRankSeparation, - NodeSep: &DefaultNodeSeparation, - EdgeSep: &DefaultEdgeSeparation, + RankDirection: expr.RankDirectionKind(rank), + Implementation: expr.ImplementationKind(DefaultImplementation), + RankSep: &DefaultRankSeparation, + NodeSep: &DefaultNodeSeparation, + EdgeSep: &DefaultEdgeSeparation, } if dsl != nil { eval.Execute(dsl, layout) @@ -1823,6 +1839,32 @@ func Position(pos int) { } } +// Implementation sets the implementation of the automatic layout, defaults to ImplementationDagre. +// +// Implementation must appear in AutoLayout. +// +// Implementation takes one argument: the ImplementationKind. +// +// Example: +// +// var _ = Design(func() { +// var System = SoftwareSystem("Software System", "My software system.") +// Views(func() { +// SystemContextView(SoftwareSystem, "context", "An overview diagram.", func() { +// AutoLayout(func() { +// Implementation(ImplementationGraphviz) +// }) +// }) +// }) +// }) +func Implementation(impl ImplementationKind) { + if a, ok := eval.Current().(*expr.AutoLayout); ok { + a.Implementation = expr.ImplementationKind(impl) + return + } + eval.IncompatibleDSL() +} + // RankSeparation sets the separation between ranks in pixels, defaults to 300. // // RankSeparation must appear in AutoLayout. diff --git a/expr/view_props.go b/expr/view_props.go index a9540875..6fd74a04 100644 --- a/expr/view_props.go +++ b/expr/view_props.go @@ -57,11 +57,12 @@ type ( // AutoLayout describes an automatic layout. AutoLayout struct { - RankDirection RankDirectionKind - RankSep *int - NodeSep *int - EdgeSep *int - Vertices *bool + Implementation ImplementationKind + RankDirection RankDirectionKind + RankSep *int + NodeSep *int + EdgeSep *int + Vertices *bool } // Vertex describes the x and y coordinate of a bend in a line. @@ -83,6 +84,9 @@ type ( // RoutingKind is the enum for possible routing algorithms. RoutingKind int + // ImplementationKind is the enum for possible automatic layout implementations + ImplementationKind int + // RankDirectionKind is the enum for possible automatic layout rank // directions. RankDirectionKind int @@ -120,6 +124,12 @@ const ( RoutingCurved ) +const ( + ImplementationUndefined ImplementationKind = iota + ImplementationGraphviz + ImplementationDagre +) + const ( RankUndefined RankDirectionKind = iota RankTopBottom diff --git a/mdl/eval.go b/mdl/eval.go index c0c58075..276b38ca 100644 --- a/mdl/eval.go +++ b/mdl/eval.go @@ -274,11 +274,12 @@ func modelizeProps(prop *expr.ViewProps) *ViewProps { } if layout := prop.AutoLayout; layout != nil { props.AutoLayout = &AutoLayout{ - RankDirection: RankDirectionKind(layout.RankDirection), - RankSep: layout.RankSep, - NodeSep: layout.NodeSep, - EdgeSep: layout.EdgeSep, - Vertices: layout.Vertices, + Implementation: ImplementationKind(layout.Implementation), + RankDirection: RankDirectionKind(layout.RankDirection), + RankSep: layout.RankSep, + NodeSep: layout.NodeSep, + EdgeSep: layout.EdgeSep, + Vertices: layout.Vertices, } } return props diff --git a/mdl/views.go b/mdl/views.go index d41d6e2e..f1331ea7 100644 --- a/mdl/views.go +++ b/mdl/views.go @@ -175,6 +175,8 @@ type ( // AutoLayout describes an automatic layout. AutoLayout struct { + // Implementation used for automatic layouting of the view + Implementation ImplementationKind `json:"implementation,omitempty"` // Algorithm rank direction. RankDirection RankDirectionKind `json:"rankDirection,omitempty"` // RankSep defines the separation between ranks in pixels. @@ -253,6 +255,9 @@ type ( // RoutingKind is the enum for possible routing algorithms. RoutingKind int + // ImplementationKind is the enum for possible automatic layout implementations + ImplementationKind int + // RankDirectionKind is the enum for possible automatic layout rank // directions. RankDirectionKind int @@ -307,6 +312,12 @@ const ( RoutingCurved ) +const ( + ImplementationUndefined ImplementationKind = iota + ImplementationGraphviz + ImplementationDagre +) + const ( RankUndefined RankDirectionKind = iota RankTopBottom @@ -575,6 +586,18 @@ func (p *PaperSizeKind) UnmarshalJSON(data []byte) error { return nil } +// Name returns the name of the implementation used in the automatic layout of the view. +func (i ImplementationKind) Name() string { + switch i { + case ImplementationGraphviz: + return "Graphviz" + case ImplementationDagre: + return "Dagre" + default: + return "ImplementationUndefined" + } +} + // Name returns the name of the rank direction is specified in the DSL. func (r RankDirectionKind) Name() string { switch r { @@ -623,6 +646,34 @@ func (r *RoutingKind) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON replaces the constant value with the proper string value. +func (i ImplementationKind) MarshalJSON() ([]byte, error) { + buf := bytes.NewBufferString(`"`) + switch i { + case ImplementationGraphviz: + buf.WriteString("Graphviz") + case ImplementationDagre: + buf.WriteString("Dagre") + } + buf.WriteString(`"`) + return buf.Bytes(), nil +} + +// UnmarshalJSON sets the constant from its JSON representation. +func (i *ImplementationKind) UnmarshalJSON(data []byte) error { + var val string + if err := json.Unmarshal(data, &val); err != nil { + return err + } + switch val { + case "Graphviz": + *i = ImplementationGraphviz + case "Dagre": + *i = ImplementationDagre + } + return nil +} + // MarshalJSON replaces the constant value with the proper string value. func (r RankDirectionKind) MarshalJSON() ([]byte, error) { buf := bytes.NewBufferString(`"`) diff --git a/stz/client_test.go b/stz/client_test.go index 463b81a1..a61ad67b 100644 --- a/stz/client_test.go +++ b/stz/client_test.go @@ -101,439 +101,556 @@ func config(t *testing.T) (workspaceID, key, secret string) { } // Serialized workspace taken from -// https://raw.githubusercontent.com/structurizr/json/master/examples/big-bank-plc.json +// https://raw.githubusercontent.com/structurizr/examples/main/json/big-bank-plc/workspace.json +// and replaced integer instances with string instances since [Structurizr DSL v1.22](https://github.com/structurizr/dsl/releases/tag/v1.22.0) var bigBankPLC = `{ "name": "Big Bank plc", - "description": "This is an example workspace to illustrate the key features of Structurizr, based around a fictional online banking system.", + "description": "This is an example workspace to illustrate the key features of Structurizr, via the DSL, based around a fictional online banking system.", + "lastModifiedDate": "2022-02-28T16:16:49Z", + "configuration": {}, "model": { "enterprise": { "name": "Big Bank plc" }, "people": [ { - "id": "15", + "id": "3", "tags": "Element,Person,Bank Staff", "name": "Back Office Staff", "description": "Administration and support staff within the bank.", "relationships": [ { - "id": "16", - "tags": "Relationship,Synchronous", - "sourceId": "15", + "id": "27", + "tags": "Relationship", + "sourceId": "3", "destinationId": "4", "description": "Uses", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], - "location": "Internal" + "location": "Internal", + "defaultTags": [ + "Element", + "Person" + ] }, { - "id": "12", + "id": "2", "tags": "Element,Person,Bank Staff", "name": "Customer Service Staff", "description": "Customer service staff within the bank.", "relationships": [ { - "id": "13", - "tags": "Relationship,Synchronous", - "sourceId": "12", + "id": "24", + "tags": "Relationship", + "sourceId": "2", "destinationId": "4", "description": "Uses", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], - "location": "Internal" + "location": "Internal", + "defaultTags": [ + "Element", + "Person" + ] }, { "id": "1", - "tags": "Element,Person", + "tags": "Element,Person,Customer", "name": "Personal Banking Customer", "description": "A customer of the bank, with personal bank accounts.", "relationships": [ { - "id": "23", - "tags": "Relationship,Synchronous", + "id": "19", + "tags": "Relationship", "sourceId": "1", - "destinationId": "17", + "destinationId": "7", "description": "Views account balances, and makes payments using", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] }, { - "id": "11", - "tags": "Relationship,Synchronous", + "id": "23", + "tags": "Relationship", "sourceId": "1", - "destinationId": "9", - "description": "Withdraws cash using", - "interactionStyle": "Synchronous" + "destinationId": "2", + "description": "Asks questions to", + "technology": "Telephone", + "defaultTags": [ + "Relationship" + ] }, { - "id": "14", - "tags": "Relationship,Synchronous", + "id": "25", + "tags": "Relationship", "sourceId": "1", - "destinationId": "12", - "description": "Asks questions to", - "technology": "Telephone", - "interactionStyle": "Synchronous" + "destinationId": "6", + "description": "Withdraws cash using", + "defaultTags": [ + "Relationship" + ] }, { - "id": "3", - "tags": "Relationship,Synchronous", + "id": "28", + "tags": "Relationship", "sourceId": "1", - "destinationId": "2", - "description": "Views account balances, and makes payments using", - "interactionStyle": "Synchronous" + "destinationId": "10", + "description": "Visits bigbank.com/ib using", + "technology": "HTTPS", + "defaultTags": [ + "Relationship" + ] }, { - "id": "24", - "tags": "Relationship,Synchronous", + "id": "29", + "tags": "Relationship", "sourceId": "1", - "destinationId": "18", + "destinationId": "8", "description": "Views account balances, and makes payments using", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] }, { - "id": "22", - "tags": "Relationship,Synchronous", + "id": "30", + "tags": "Relationship", "sourceId": "1", - "destinationId": "19", - "description": "Visits bigbank.com/ib using", - "technology": "HTTPS", - "interactionStyle": "Synchronous" + "destinationId": "9", + "description": "Views account balances, and makes payments using", + "defaultTags": [ + "Relationship" + ] } ], - "location": "External" + "location": "External", + "defaultTags": [ + "Element", + "Person" + ] } ], "softwareSystems": [ { - "id": "9", + "id": "6", "tags": "Element,Software System,Existing System", "name": "ATM", "description": "Allows customers to withdraw cash.", "relationships": [ { - "id": "10", - "tags": "Relationship,Synchronous", - "sourceId": "9", + "id": "26", + "tags": "Relationship", + "sourceId": "6", "destinationId": "4", "description": "Uses", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], - "location": "Internal" + "location": "Internal", + "defaultTags": [ + "Element", + "Software System" + ] }, { - "id": "6", + "id": "5", "tags": "Element,Software System,Existing System", "name": "E-mail System", "description": "The internal Microsoft Exchange e-mail system.", "relationships": [ { - "id": "8", - "tags": "Relationship,Synchronous", - "sourceId": "6", + "id": "22", + "tags": "Relationship", + "sourceId": "5", "destinationId": "1", "description": "Sends e-mails to", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], - "location": "Internal" + "location": "Internal", + "defaultTags": [ + "Element", + "Software System" + ] }, { - "id": "2", + "id": "7", "tags": "Element,Software System", "name": "Internet Banking System", "description": "Allows customers to view information about their bank accounts, and make payments.", "relationships": [ { - "id": "7", - "tags": "Relationship,Synchronous", - "sourceId": "2", - "destinationId": "6", - "description": "Sends e-mail using", - "interactionStyle": "Synchronous" - }, - { - "id": "5", - "tags": "Relationship,Synchronous", - "sourceId": "2", + "id": "20", + "tags": "Relationship", + "sourceId": "7", "destinationId": "4", "description": "Gets account information from, and makes payments using", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] + }, + { + "id": "21", + "tags": "Relationship", + "sourceId": "7", + "destinationId": "5", + "description": "Sends e-mail using", + "defaultTags": [ + "Relationship" + ] } ], "location": "Internal", "containers": [ { - "id": "20", + "id": "11", "tags": "Element,Container", "name": "API Application", "description": "Provides Internet banking functionality via a JSON/HTTPS API.", "relationships": [ { - "id": "27", - "tags": "Relationship,Synchronous", - "sourceId": "20", + "id": "45", + "sourceId": "11", + "destinationId": "18", + "description": "Reads from and writes to", + "technology": "JDBC", + "linkedRelationshipId": "44" + }, + { + "id": "47", + "sourceId": "11", "destinationId": "4", "description": "Makes API calls to", "technology": "XML/HTTPS", - "interactionStyle": "Synchronous" + "linkedRelationshipId": "46" }, { - "id": "26", - "tags": "Relationship,Synchronous", - "sourceId": "20", - "destinationId": "21", - "description": "Reads from and writes to", - "technology": "JDBC", - "interactionStyle": "Synchronous" - }, - { - "id": "28", - "tags": "Relationship,Synchronous", - "sourceId": "20", - "destinationId": "6", + "id": "49", + "sourceId": "11", + "destinationId": "5", "description": "Sends e-mail using", - "technology": "SMTP", - "interactionStyle": "Synchronous" + "linkedRelationshipId": "48" } ], "technology": "Java and Spring MVC", "components": [ { - "id": "30", + "id": "13", "tags": "Element,Component", "name": "Accounts Summary Controller", "description": "Provides customers with a summary of their bank accounts.", "relationships": [ { - "id": "42", - "tags": "Relationship,Synchronous", - "sourceId": "30", - "destinationId": "33", + "id": "41", + "tags": "Relationship", + "sourceId": "13", + "destinationId": "16", "description": "Uses", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], "technology": "Spring MVC Rest Controller", - "size": 0 + "size": 0, + "defaultTags": [ + "Element", + "Component" + ] }, { - "id": "34", + "id": "17", "tags": "Element,Component", "name": "E-mail Component", "description": "Sends e-mails to users.", "relationships": [ { - "id": "47", - "tags": "Relationship,Synchronous", - "sourceId": "34", - "destinationId": "6", + "id": "48", + "tags": "Relationship", + "sourceId": "17", + "destinationId": "5", "description": "Sends e-mail using", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], "technology": "Spring Bean", - "size": 0 + "size": 0, + "defaultTags": [ + "Element", + "Component" + ] }, { - "id": "33", + "id": "16", "tags": "Element,Component", "name": "Mainframe Banking System Facade", "description": "A facade onto the mainframe banking system.", "relationships": [ { "id": "46", - "tags": "Relationship,Synchronous", - "sourceId": "33", + "tags": "Relationship", + "sourceId": "16", "destinationId": "4", - "description": "Uses", + "description": "Makes API calls to", "technology": "XML/HTTPS", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], "technology": "Spring Bean", - "size": 0 + "size": 0, + "defaultTags": [ + "Element", + "Component" + ] }, { - "id": "31", + "id": "14", "tags": "Element,Component", "name": "Reset Password Controller", "description": "Allows users to reset their passwords with a single use URL.", "relationships": [ { - "id": "44", - "tags": "Relationship,Synchronous", - "sourceId": "31", - "destinationId": "34", + "id": "42", + "tags": "Relationship", + "sourceId": "14", + "destinationId": "15", "description": "Uses", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] }, { "id": "43", - "tags": "Relationship,Synchronous", - "sourceId": "31", - "destinationId": "32", + "tags": "Relationship", + "sourceId": "14", + "destinationId": "17", "description": "Uses", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], "technology": "Spring MVC Rest Controller", - "size": 0 + "size": 0, + "defaultTags": [ + "Element", + "Component" + ] }, { - "id": "32", + "id": "15", "tags": "Element,Component", "name": "Security Component", "description": "Provides functionality related to signing in, changing passwords, etc.", "relationships": [ { - "id": "45", - "tags": "Relationship,Synchronous", - "sourceId": "32", - "destinationId": "21", + "id": "44", + "tags": "Relationship", + "sourceId": "15", + "destinationId": "18", "description": "Reads from and writes to", "technology": "JDBC", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], "technology": "Spring Bean", - "size": 0 + "size": 0, + "defaultTags": [ + "Element", + "Component" + ] }, { - "id": "29", + "id": "12", "tags": "Element,Component", "name": "Sign In Controller", "description": "Allows users to sign in to the Internet Banking System.", "relationships": [ { - "id": "41", - "tags": "Relationship,Synchronous", - "sourceId": "29", - "destinationId": "32", + "id": "40", + "tags": "Relationship", + "sourceId": "12", + "destinationId": "15", "description": "Uses", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], "technology": "Spring MVC Rest Controller", - "size": 0 + "size": 0, + "defaultTags": [ + "Element", + "Component" + ] } + ], + "defaultTags": [ + "Element", + "Container" ] }, { - "id": "21", + "id": "18", "tags": "Element,Container,Database", "name": "Database", "description": "Stores user registration information, hashed authentication credentials, access logs, etc.", - "technology": "Oracle Database Schema" + "technology": "Oracle Database Schema", + "defaultTags": [ + "Element", + "Container" + ] }, { - "id": "18", + "id": "9", "tags": "Element,Container,Mobile App", "name": "Mobile App", "description": "Provides a limited subset of the Internet banking functionality to customers via their mobile device.", "relationships": [ { - "id": "39", - "tags": "Relationship,Synchronous", - "sourceId": "18", - "destinationId": "31", + "id": "36", + "tags": "Relationship", + "sourceId": "9", + "destinationId": "12", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] }, { - "id": "49", - "tags": "Relationship,Synchronous", - "sourceId": "18", - "destinationId": "20", + "id": "37", + "sourceId": "9", + "destinationId": "11", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous" + "linkedRelationshipId": "36" }, { "id": "38", - "tags": "Relationship,Synchronous", - "sourceId": "18", - "destinationId": "29", + "tags": "Relationship", + "sourceId": "9", + "destinationId": "13", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] }, { - "id": "40", - "tags": "Relationship,Synchronous", - "sourceId": "18", - "destinationId": "30", + "id": "39", + "tags": "Relationship", + "sourceId": "9", + "destinationId": "14", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], - "technology": "Xamarin" + "technology": "Xamarin", + "defaultTags": [ + "Element", + "Container" + ] }, { - "id": "17", + "id": "8", "tags": "Element,Container,Web Browser", "name": "Single-Page Application", "description": "Provides all of the Internet banking functionality to customers via their web browser.", "relationships": [ { - "id": "37", - "tags": "Relationship,Synchronous", - "sourceId": "17", - "destinationId": "30", + "id": "32", + "tags": "Relationship", + "sourceId": "8", + "destinationId": "12", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] }, { - "id": "35", - "tags": "Relationship,Synchronous", - "sourceId": "17", - "destinationId": "29", + "id": "33", + "sourceId": "8", + "destinationId": "11", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous" + "linkedRelationshipId": "32" }, { - "id": "48", - "tags": "Relationship,Synchronous", - "sourceId": "17", - "destinationId": "20", + "id": "34", + "tags": "Relationship", + "sourceId": "8", + "destinationId": "13", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] }, { - "id": "36", - "tags": "Relationship,Synchronous", - "sourceId": "17", - "destinationId": "31", + "id": "35", + "tags": "Relationship", + "sourceId": "8", + "destinationId": "14", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], - "technology": "JavaScript and Angular" + "technology": "JavaScript and Angular", + "defaultTags": [ + "Element", + "Container" + ] }, { - "id": "19", + "id": "10", "tags": "Element,Container", "name": "Web Application", "description": "Delivers the static content and the Internet banking single page application.", "relationships": [ { - "id": "25", - "tags": "Relationship,Synchronous", - "sourceId": "19", - "destinationId": "17", + "id": "31", + "tags": "Relationship", + "sourceId": "10", + "destinationId": "8", "description": "Delivers to the customer's web browser", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], - "technology": "Java and Spring MVC" + "technology": "Java and Spring MVC", + "defaultTags": [ + "Element", + "Container" + ] } + ], + "defaultTags": [ + "Element", + "Software System" ] }, { @@ -541,123 +658,168 @@ var bigBankPLC = `{ "tags": "Element,Software System,Existing System", "name": "Mainframe Banking System", "description": "Stores all of the core banking information about customers, accounts, transactions, etc.", - "location": "Internal" + "location": "Internal", + "defaultTags": [ + "Element", + "Software System" + ] } ], "deploymentNodes": [ + { + "id": "63", + "tags": "Element,Deployment Node,", + "name": "Big Bank plc", + "environment": "Development", + "technology": "Big Bank plc data center", + "instances": "1", + "children": [ + { + "id": "64", + "tags": "Element,Deployment Node,", + "name": "bigbank-dev001", + "environment": "Development", + "instances": "1", + "softwareSystemInstances": [ + { + "id": "65", + "tags": "Software System Instance", + "environment": "Development", + "deploymentGroups": [ + "Default" + ], + "instanceId": 1, + "softwareSystemId": "4" + } + ], + "children": [], + "containerInstances": [], + "infrastructureNodes": [] + } + ], + "softwareSystemInstances": [], + "containerInstances": [], + "infrastructureNodes": [] + }, { "id": "50", "tags": "Element,Deployment Node", "name": "Developer Laptop", - "description": "A developer laptop.", "environment": "Development", "technology": "Microsoft Windows 10 or Apple macOS", "instances": "1", "children": [ { - "id": "55", + "id": "59", "tags": "Element,Deployment Node", "name": "Docker Container - Database Server", - "description": "A Docker container.", "environment": "Development", "technology": "Docker", "instances": "1", "children": [ { - "id": "56", + "id": "60", "tags": "Element,Deployment Node", "name": "Database Server", - "description": "A development database.", "environment": "Development", "technology": "Oracle 12c", "instances": "1", "containerInstances": [ { - "id": "57", + "id": "61", "tags": "Container Instance", "environment": "Development", - "containerId": "21", + "deploymentGroups": [ + "Default" + ], "instanceId": 1, - "properties": {} + "containerId": "18" } ], "children": [], + "softwareSystemInstances": [], "infrastructureNodes": [] } ], + "softwareSystemInstances": [], "containerInstances": [], "infrastructureNodes": [] }, { - "id": "51", + "id": "53", "tags": "Element,Deployment Node", "name": "Docker Container - Web Server", - "description": "A Docker container.", "environment": "Development", "technology": "Docker", "instances": "1", "children": [ { - "id": "52", + "id": "54", "tags": "Element,Deployment Node", - "properties": { - "Java Version": "8", - "Xms": "1024M", - "Xmx": "512M" - }, "name": "Apache Tomcat", - "description": "An open source Java EE web server.", "environment": "Development", "technology": "Apache Tomcat 8.x", "instances": "1", "containerInstances": [ { - "id": "54", + "id": "57", "tags": "Container Instance", "relationships": [ { - "id": "58", - "sourceId": "54", - "destinationId": "57", + "id": "62", + "sourceId": "57", + "destinationId": "61", "description": "Reads from and writes to", "technology": "JDBC", - "interactionStyle": "Synchronous", - "linkedRelationshipId": "26" + "linkedRelationshipId": "45" + }, + { + "id": "66", + "sourceId": "57", + "destinationId": "65", + "description": "Makes API calls to", + "technology": "XML/HTTPS", + "linkedRelationshipId": "47" } ], "environment": "Development", - "containerId": "20", + "deploymentGroups": [ + "Default" + ], "instanceId": 1, - "properties": {} + "containerId": "11" }, { - "id": "53", + "id": "55", "tags": "Container Instance", "relationships": [ { - "id": "62", - "sourceId": "53", - "destinationId": "60", + "id": "56", + "sourceId": "55", + "destinationId": "52", "description": "Delivers to the customer's web browser", - "interactionStyle": "Synchronous", - "linkedRelationshipId": "25" + "linkedRelationshipId": "31" } ], "environment": "Development", - "containerId": "19", + "deploymentGroups": [ + "Default" + ], "instanceId": 1, - "properties": {} + "containerId": "10" } ], "children": [], + "softwareSystemInstances": [], "infrastructureNodes": [] } ], + "softwareSystemInstances": [], "containerInstances": [], "infrastructureNodes": [] }, { - "id": "59", + "id": "51", "tags": "Element,Deployment Node", "name": "Web Browser", "environment": "Development", @@ -665,34 +827,37 @@ var bigBankPLC = `{ "instances": "1", "containerInstances": [ { - "id": "60", + "id": "52", "tags": "Container Instance", "relationships": [ { - "id": "61", - "sourceId": "60", - "destinationId": "54", + "id": "58", + "sourceId": "52", + "destinationId": "57", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous", - "linkedRelationshipId": "48" + "linkedRelationshipId": "33" } ], "environment": "Development", - "containerId": "17", + "deploymentGroups": [ + "Default" + ], "instanceId": 1, - "properties": {} + "containerId": "8" } ], "children": [], + "softwareSystemInstances": [], "infrastructureNodes": [] } ], + "softwareSystemInstances": [], "containerInstances": [], "infrastructureNodes": [] }, { - "id": "68", + "id": "72", "tags": "Element,Deployment Node", "name": "Big Bank plc", "environment": "Live", @@ -700,93 +865,89 @@ var bigBankPLC = `{ "instances": "1", "children": [ { - "id": "73", - "tags": "Element,Deployment Node", - "properties": { - "Location": "London and Reading" - }, + "id": "77", + "tags": "Element,Deployment Node,", "name": "bigbank-api***", - "description": "A web server residing in the web server farm, accessed via F5 BIG-IP LTMs.", "environment": "Live", "technology": "Ubuntu 16.04 LTS", "instances": "8", "children": [ { - "id": "74", + "id": "78", "tags": "Element,Deployment Node", - "properties": { - "Java Version": "8", - "Xms": "1024M", - "Xmx": "512M" - }, "name": "Apache Tomcat", - "description": "An open source Java EE web server.", "environment": "Live", "technology": "Apache Tomcat 8.x", "instances": "1", "containerInstances": [ { - "id": "75", + "id": "79", "tags": "Container Instance", "relationships": [ { - "id": "81", - "sourceId": "75", - "destinationId": "80", + "id": "85", + "sourceId": "79", + "destinationId": "84", "description": "Reads from and writes to", "technology": "JDBC", - "interactionStyle": "Synchronous", - "linkedRelationshipId": "26" + "linkedRelationshipId": "45" }, { - "id": "85", - "tags": "Failover", - "sourceId": "75", - "destinationId": "84", + "id": "89", + "sourceId": "79", + "destinationId": "88", "description": "Reads from and writes to", "technology": "JDBC", - "interactionStyle": "Synchronous", - "linkedRelationshipId": "26" + "linkedRelationshipId": "45" + }, + { + "id": "92", + "sourceId": "79", + "destinationId": "91", + "description": "Makes API calls to", + "technology": "XML/HTTPS", + "linkedRelationshipId": "47" } ], "environment": "Live", - "containerId": "20", - "instanceId": 2, - "properties": {} + "deploymentGroups": [ + "Default" + ], + "instanceId": 1, + "containerId": "11" } ], "children": [], + "softwareSystemInstances": [], "infrastructureNodes": [] } ], + "softwareSystemInstances": [], "containerInstances": [], "infrastructureNodes": [] }, { - "id": "78", + "id": "82", "tags": "Element,Deployment Node", - "properties": { - "Location": "London" - }, "name": "bigbank-db01", - "description": "The primary database server.", "environment": "Live", "technology": "Ubuntu 16.04 LTS", "instances": "1", "children": [ { - "id": "79", + "id": "83", "tags": "Element,Deployment Node", "name": "Oracle - Primary", - "description": "The primary, live database server.", "relationships": [ { - "id": "86", - "tags": "Relationship,Synchronous", - "sourceId": "79", - "destinationId": "83", + "id": "93", + "tags": "Relationship", + "sourceId": "83", + "destinationId": "87", "description": "Replicates data to", - "interactionStyle": "Synchronous" + "defaultTags": [ + "Relationship" + ] } ], "environment": "Live", @@ -794,116 +955,135 @@ var bigBankPLC = `{ "instances": "1", "containerInstances": [ { - "id": "80", + "id": "84", "tags": "Container Instance", "environment": "Live", - "containerId": "21", - "instanceId": 2, - "properties": {} + "deploymentGroups": [ + "Default" + ], + "instanceId": 1, + "containerId": "18" } ], "children": [], + "softwareSystemInstances": [], "infrastructureNodes": [] } ], + "softwareSystemInstances": [], "containerInstances": [], "infrastructureNodes": [] }, { - "id": "82", + "id": "86", "tags": "Element,Deployment Node,Failover", - "properties": { - "Location": "Reading" - }, "name": "bigbank-db02", - "description": "The secondary database server.", "environment": "Live", "technology": "Ubuntu 16.04 LTS", "instances": "1", "children": [ { - "id": "83", + "id": "87", "tags": "Element,Deployment Node,Failover", "name": "Oracle - Secondary", - "description": "A secondary, standby database server, used for failover purposes only.", "environment": "Live", "technology": "Oracle 12c", "instances": "1", "containerInstances": [ { - "id": "84", - "tags": "Container Instance,Failover", + "id": "88", + "tags": "Container Instance", "environment": "Live", - "containerId": "21", - "instanceId": 3, - "properties": {} + "deploymentGroups": [ + "Default" + ], + "instanceId": 1, + "containerId": "18" } ], "children": [], + "softwareSystemInstances": [], "infrastructureNodes": [] } ], + "softwareSystemInstances": [], "containerInstances": [], "infrastructureNodes": [] }, { - "id": "69", - "tags": "Element,Deployment Node", - "properties": { - "Location": "London and Reading" - }, + "id": "90", + "tags": "Element,Deployment Node,", + "name": "bigbank-prod001", + "environment": "Live", + "instances": "1", + "softwareSystemInstances": [ + { + "id": "91", + "tags": "Software System Instance", + "environment": "Live", + "deploymentGroups": [ + "Default" + ], + "instanceId": 1, + "softwareSystemId": "4" + } + ], + "children": [], + "containerInstances": [], + "infrastructureNodes": [] + }, + { + "id": "73", + "tags": "Element,Deployment Node,", "name": "bigbank-web***", - "description": "A web server residing in the web server farm, accessed via F5 BIG-IP LTMs.", "environment": "Live", "technology": "Ubuntu 16.04 LTS", "instances": "4", "children": [ { - "id": "70", + "id": "74", "tags": "Element,Deployment Node", - "properties": { - "Java Version": "8", - "Xms": "1024M", - "Xmx": "512M" - }, "name": "Apache Tomcat", - "description": "An open source Java EE web server.", "environment": "Live", "technology": "Apache Tomcat 8.x", "instances": "1", "containerInstances": [ { - "id": "71", + "id": "75", "tags": "Container Instance", "relationships": [ { - "id": "72", - "sourceId": "71", - "destinationId": "67", + "id": "76", + "sourceId": "75", + "destinationId": "71", "description": "Delivers to the customer's web browser", - "interactionStyle": "Synchronous", - "linkedRelationshipId": "25" + "linkedRelationshipId": "31" } ], "environment": "Live", - "containerId": "19", - "instanceId": 2, - "properties": {} + "deploymentGroups": [ + "Default" + ], + "instanceId": 1, + "containerId": "10" } ], "children": [], + "softwareSystemInstances": [], "infrastructureNodes": [] } ], + "softwareSystemInstances": [], "containerInstances": [], "infrastructureNodes": [] } ], + "softwareSystemInstances": [], "containerInstances": [], "infrastructureNodes": [] }, { - "id": "65", + "id": "69", "tags": "Element,Deployment Node", "name": "Customer's computer", "environment": "Live", @@ -911,7 +1091,7 @@ var bigBankPLC = `{ "instances": "1", "children": [ { - "id": "66", + "id": "70", "tags": "Element,Deployment Node", "name": "Web Browser", "environment": "Live", @@ -919,34 +1099,37 @@ var bigBankPLC = `{ "instances": "1", "containerInstances": [ { - "id": "67", + "id": "71", "tags": "Container Instance", "relationships": [ { - "id": "77", - "sourceId": "67", - "destinationId": "75", + "id": "80", + "sourceId": "71", + "destinationId": "79", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous", - "linkedRelationshipId": "48" + "linkedRelationshipId": "33" } ], "environment": "Live", - "containerId": "17", - "instanceId": 2, - "properties": {} + "deploymentGroups": [ + "Default" + ], + "instanceId": 1, + "containerId": "8" } ], "children": [], + "softwareSystemInstances": [], "infrastructureNodes": [] } ], + "softwareSystemInstances": [], "containerInstances": [], "infrastructureNodes": [] }, { - "id": "63", + "id": "67", "tags": "Element,Deployment Node", "name": "Customer's mobile device", "environment": "Live", @@ -954,207 +1137,158 @@ var bigBankPLC = `{ "instances": "1", "containerInstances": [ { - "id": "64", + "id": "68", "tags": "Container Instance", "relationships": [ { - "id": "76", - "sourceId": "64", - "destinationId": "75", + "id": "81", + "sourceId": "68", + "destinationId": "79", "description": "Makes API calls to", "technology": "JSON/HTTPS", - "interactionStyle": "Synchronous", - "linkedRelationshipId": "49" + "linkedRelationshipId": "37" } ], "environment": "Live", - "containerId": "18", + "deploymentGroups": [ + "Default" + ], "instanceId": 1, - "properties": {} + "containerId": "9" } ], "children": [], + "softwareSystemInstances": [], "infrastructureNodes": [] } - ] + ], + "customElements": [] }, "documentation": { - "sections": [ - { - "elementId": "2", - "title": "Context", - "order": 1, - "format": "Markdown", - "content": "Here is some context about the Internet Banking System...\n![](embed:SystemLandscape)\n![](embed:SystemContext)\n### Internet Banking System\n...\n### Mainframe Banking System\n...\n" - }, - { - "elementId": "19", - "title": "Components", - "order": 3, - "format": "Markdown", - "content": "Here is some information about the API Application...\n![](embed:Components)\n### Sign in process\nHere is some information about the Sign In Controller, including how the sign in process works...\n![](embed:SignIn)" - }, - { - "elementId": "2", - "title": "Development Environment", - "order": 4, - "format": "AsciiDoc", - "content": "Here is some information about how to set up a development environment for the Internet Banking System...\nimage::embed:DevelopmentDeployment[]" - }, - { - "elementId": "2", - "title": "Containers", - "order": 2, - "format": "Markdown", - "content": "Here is some information about the containers within the Internet Banking System...\n![](embed:Containers)\n### Web Application\n...\n### Database\n...\n" - }, - { - "elementId": "2", - "title": "Deployment", - "order": 5, - "format": "AsciiDoc", - "content": "Here is some information about the live deployment environment for the Internet Banking System...\nimage::embed:LiveDeployment[]" - } - ], - "template": { - "name": "Software Guidebook", - "author": "Simon Brown", - "url": "https://leanpub.com/visualising-software-architecture" - }, + "sections": [], "decisions": [], "images": [] }, "views": { "systemLandscapeViews": [ { - "description": "The system landscape diagram for Big Bank plc.", "key": "SystemLandscape", - "paperSize": "A5_Landscape", - "animations": [ + "automaticLayout": { + "implementation": "Graphviz", + "rankDirection": "TopBottom", + "rankSeparation": 300, + "nodeSeparation": 300, + "edgeSeparation": 0, + "vertices": false + }, + "enterpriseBoundaryVisible": true, + "elements": [ { - "order": 1, - "elements": [ - "1", - "2", - "4", - "6" - ], - "relationships": [ - "3", - "5", - "7", - "8" - ] + "id": "1", + "x": 845, + "y": 213 }, { - "order": 2, - "elements": [ - "9" - ], - "relationships": [ - "11", - "10" - ] - }, - { - "order": 3, - "elements": [ - "12", - "15" - ], - "relationships": [ - "13", - "14", - "16" - ] - } - ], - "enterpriseBoundaryVisible": true, - "elements": [ - { - "id": "1", - "x": 87, - "y": 643 - }, - { - "id": "12", - "x": 1947, - "y": 36 + "id": "2", + "x": 1945, + "y": 913 }, { - "id": "2", - "x": 1012, - "y": 813 + "id": "3", + "x": 2645, + "y": 913 }, { "id": "4", - "x": 1922, - "y": 693 + "x": 1558, + "y": 1613 }, { - "id": "15", - "x": 1947, - "y": 1241 + "id": "5", + "x": 445, + "y": 1613 }, { "id": "6", - "x": 1012, - "y": 1326 + "x": 1195, + "y": 963 }, { - "id": "9", - "x": 1012, - "y": 301 + "id": "7", + "x": 445, + "y": 963 } ], "relationships": [ { - "id": "16" + "id": "27" }, { - "id": "3" + "id": "26" }, { - "id": "14", - "vertices": [ - { - "x": 285, - "y": 240 - } - ] + "id": "25" }, { - "id": "5" + "id": "24" }, { - "id": "13" + "id": "23", + "vertices": [ + { + "x": 1795, + "y": 809 + } + ] }, { - "id": "11" + "id": "22", + "vertices": [ + { + "x": 295, + "y": 1313 + }, + { + "x": 295, + "y": 809 + } + ] }, { - "id": "7" + "id": "21" }, { - "id": "8" + "id": "20" }, { - "id": "10" + "id": "19" } - ] + ], + "animations": [], + "paperSize": "A4_Landscape", + "dimensions": { + "width": 3270, + "height": 2220 + } } ], "systemContextViews": [ { - "softwareSystemId": "2", - "description": "The system context diagram for the Internet Banking System.", + "softwareSystemId": "7", "key": "SystemContext", - "paperSize": "A5_Landscape", + "automaticLayout": { + "implementation": "Graphviz", + "rankDirection": "TopBottom", + "rankSeparation": 300, + "nodeSeparation": 300, + "edgeSeparation": 0, + "vertices": false + }, "animations": [ { "order": 1, "elements": [ - "2" + "7" ], "relationships": [] }, @@ -1164,7 +1298,7 @@ var bigBankPLC = `{ "1" ], "relationships": [ - "3" + "19" ] }, { @@ -1173,197 +1307,203 @@ var bigBankPLC = `{ "4" ], "relationships": [ - "5" + "20" ] }, { "order": 4, "elements": [ - "6" + "5" ], "relationships": [ - "7", - "8" + "22", + "21" ] } ], - "enterpriseBoundaryVisible": false, + "enterpriseBoundaryVisible": true, "elements": [ { "id": "1", - "x": 632, - "y": 69 + "x": 0, + "y": 0 }, { - "id": "2", - "x": 607, - "y": 714 + "id": "4", + "x": 0, + "y": 0 }, { - "id": "4", - "x": 607, - "y": 1259 + "id": "5", + "x": 0, + "y": 0 }, { - "id": "6", - "x": 1422, - "y": 714 + "id": "7", + "x": 0, + "y": 0 } ], "relationships": [ { - "id": "3" + "id": "22" }, { - "id": "5" + "id": "21" }, { - "id": "7" + "id": "20" }, { - "id": "8" + "id": "19" } ] } ], "containerViews": [ { - "softwareSystemId": "2", - "description": "The container diagram for the Internet Banking System.", + "softwareSystemId": "7", "key": "Containers", - "paperSize": "A5_Landscape", + "automaticLayout": { + "implementation": "Graphviz", + "rankDirection": "TopBottom", + "rankSeparation": 300, + "nodeSeparation": 300, + "edgeSeparation": 0, + "vertices": false + }, "animations": [ { "order": 1, "elements": [ "1", "4", - "6" + "5" ], "relationships": [ - "8" + "22" ] }, { "order": 2, "elements": [ - "19" + "10" ], "relationships": [ - "22" + "28" ] }, { "order": 3, "elements": [ - "17" + "8" ], "relationships": [ - "23", - "25" + "29", + "31" ] }, { "order": 4, "elements": [ - "18" + "9" ], "relationships": [ - "24" + "30" ] }, { "order": 5, "elements": [ - "20" + "11" ], "relationships": [ - "48", - "27", - "49", - "28" + "33", + "47", + "37", + "49" ] }, { "order": 6, "elements": [ - "21" + "18" ], "relationships": [ - "26" + "45" ] } ], - "externalSoftwareSystemBoundariesVisible": false, + "externalSoftwareSystemBoundariesVisible": true, "elements": [ { - "id": "1", - "x": 1056, - "y": 24 + "id": "11", + "x": 0, + "y": 0 }, { - "id": "4", - "x": 2012, - "y": 1214 + "id": "1", + "x": 0, + "y": 0 }, { - "id": "17", - "x": 780, - "y": 664 + "id": "4", + "x": 0, + "y": 0 }, { - "id": "6", - "x": 2012, - "y": 664 + "id": "5", + "x": 0, + "y": 0 }, { "id": "18", - "x": 1283, - "y": 664 + "x": 0, + "y": 0 }, { - "id": "19", - "x": 37, - "y": 664 + "id": "8", + "x": 0, + "y": 0 }, { - "id": "20", - "x": 1031, - "y": 1214 + "id": "9", + "x": 0, + "y": 0 }, { - "id": "21", - "x": 37, - "y": 1214 + "id": "10", + "x": 0, + "y": 0 } ], "relationships": [ { - "id": "28" + "id": "29" }, { - "id": "27" + "id": "28" }, { - "id": "26" + "id": "37" }, { - "id": "25" + "id": "33" }, { - "id": "24" + "id": "22" }, { - "id": "23" + "id": "31" }, { - "id": "22" + "id": "45" }, { - "id": "8" + "id": "30" }, { - "id": "48" + "id": "47" }, { "id": "49" @@ -1373,168 +1513,166 @@ var bigBankPLC = `{ ], "componentViews": [ { - "description": "The component diagram for the API Application.", "key": "Components", - "paperSize": "A5_Landscape", + "automaticLayout": { + "implementation": "Graphviz", + "rankDirection": "TopBottom", + "rankSeparation": 300, + "nodeSeparation": 300, + "edgeSeparation": 0, + "vertices": false + }, "animations": [ { "order": 1, "elements": [ "4", - "17", - "6", + "5", "18", - "21" + "8", + "9" ], "relationships": [] }, { "order": 2, "elements": [ - "29", - "32" + "12", + "15" ], "relationships": [ - "45", - "35", - "38", - "41" + "44", + "36", + "40", + "32" ] }, { "order": 3, "elements": [ - "33", - "30" + "13", + "16" ], "relationships": [ + "34", "46", - "37", - "40", - "42" + "38", + "41" ] }, { "order": 4, "elements": [ - "34", - "31" + "14", + "17" ], "relationships": [ - "44", - "36", - "47", + "35", + "48", "39", + "42", "43" ] } ], - "containerId": "20", + "containerId": "11", + "externalContainerBoundariesVisible": true, "elements": [ { - "id": "33", - "x": 1925, - "y": 817 + "id": "12", + "x": 0, + "y": 0 }, { - "id": "34", - "x": 1015, - "y": 817 + "id": "13", + "x": 0, + "y": 0 }, { - "id": "4", - "x": 1925, - "y": 1307 + "id": "14", + "x": 0, + "y": 0 }, { - "id": "17", - "x": 560, - "y": 10 + "id": "15", + "x": 0, + "y": 0 }, { - "id": "6", - "x": 1015, - "y": 1307 + "id": "4", + "x": 0, + "y": 0 }, { - "id": "18", - "x": 1470, - "y": 11 + "id": "5", + "x": 0, + "y": 0 }, { - "id": "29", - "x": 105, - "y": 436 + "id": "16", + "x": 0, + "y": 0 }, { - "id": "30", - "x": 1925, - "y": 436 + "id": "17", + "x": 0, + "y": 0 }, { - "id": "31", - "x": 1015, - "y": 436 + "id": "18", + "x": 0, + "y": 0 }, { - "id": "21", - "x": 105, - "y": 1307 + "id": "8", + "x": 0, + "y": 0 }, { - "id": "32", - "x": 105, - "y": 817 + "id": "9", + "x": 0, + "y": 0 } ], "relationships": [ { - "id": "40", - "position": 40 + "id": "40" }, { - "id": "41", - "position": 55 + "id": "41" }, { - "id": "42", - "position": 50 + "id": "42" }, { "id": "43" }, { - "id": "37", - "position": 85 + "id": "32" }, { - "id": "36", - "position": 45 + "id": "36" }, { - "id": "35", - "position": 35 + "id": "35" }, { - "id": "44" + "id": "34" }, { - "id": "45", - "position": 60 + "id": "44" }, { "id": "46" }, { - "id": "47" + "id": "48" }, { - "id": "38", - "position": 85 + "id": "38" }, { - "id": "39", - "position": 40 + "id": "39" } ] } @@ -1543,198 +1681,185 @@ var bigBankPLC = `{ { "description": "Summarises how the sign in feature works in the single-page application.", "key": "SignIn", - "paperSize": "A5_Landscape", - "elementId": "20", + "automaticLayout": { + "implementation": "Graphviz", + "rankDirection": "TopBottom", + "rankSeparation": 300, + "nodeSeparation": 300, + "edgeSeparation": 0, + "vertices": false + }, + "elementId": "11", + "externalBoundariesVisible": true, "relationships": [ { - "id": "35", + "id": "32", "description": "Submits credentials to", - "order": "1" + "order": "1", + "response": false }, { - "id": "41", - "description": "Calls isAuthenticated() on", - "order": "2" + "id": "40", + "description": "Validates credentials using", + "order": "2", + "response": false }, { - "id": "45", + "id": "44", "description": "select * from users where username = ?", - "order": "3" + "order": "3", + "response": false + }, + { + "id": "44", + "description": "Returns user data to", + "order": "4", + "response": true + }, + { + "id": "40", + "description": "Returns true if the hashed password matches", + "order": "5", + "response": true + }, + { + "id": "32", + "description": "Sends back an authentication token to", + "order": "6", + "response": true } ], "elements": [ { - "id": "17", - "x": 552, - "y": 211 + "id": "12", + "x": 0, + "y": 0 }, { - "id": "29", - "x": 1477, - "y": 211 + "id": "15", + "x": 0, + "y": 0 }, { - "id": "32", - "x": 1477, - "y": 1116 + "id": "18", + "x": 0, + "y": 0 }, { - "id": "21", - "x": 552, - "y": 1116 + "id": "8", + "x": 0, + "y": 0 } ] } ], "deploymentViews": [ { - "softwareSystemId": "2", - "description": "An example live deployment scenario for the Internet Banking System.", - "key": "LiveDeployment", - "paperSize": "A5_Landscape", - "environment": "Live", + "softwareSystemId": "7", + "key": "DevelopmentDeployment", + "automaticLayout": { + "implementation": "Graphviz", + "rankDirection": "TopBottom", + "rankSeparation": 300, + "nodeSeparation": 300, + "edgeSeparation": 0, + "vertices": false + }, + "environment": "Development", "animations": [ { "order": 1, "elements": [ - "66", - "67", - "65" + "50", + "51", + "52" ] }, { "order": 2, "elements": [ - "63", - "64" - ] - }, - { - "order": 3, - "elements": [ - "68", - "69", - "70", - "71", - "73", - "74", - "75" - ], - "relationships": [ - "77", - "72", - "76" - ] - }, - { - "order": 4, - "elements": [ - "78", - "79", - "80" + "55", + "57", + "53", + "54" ], "relationships": [ - "81" + "56", + "58" ] }, { - "order": 5, + "order": 3, "elements": [ - "82", - "83", - "84" + "59", + "60", + "61" ], "relationships": [ - "85", - "86" + "62" ] } ], "elements": [ { - "id": "66", + "id": "55", "x": 0, "y": 0 }, { - "id": "78", + "id": "57", "x": 0, "y": 0 }, { - "id": "67", - "x": 150, - "y": 1026 - }, - { - "id": "79", + "id": "59", "x": 0, "y": 0 }, { - "id": "68", + "id": "60", "x": 0, "y": 0 }, { - "id": "69", + "id": "61", "x": 0, "y": 0 }, { - "id": "80", - "x": 1820, - "y": 176 - }, - { - "id": "70", + "id": "50", "x": 0, "y": 0 }, { - "id": "71", - "x": 985, - "y": 1026 - }, - { - "id": "82", + "id": "51", "x": 0, "y": 0 }, { - "id": "83", + "id": "52", "x": 0, "y": 0 }, { - "id": "84", - "x": 1820, - "y": 1026 - }, - { - "id": "73", + "id": "63", "x": 0, "y": 0 }, { - "id": "74", + "id": "53", "x": 0, "y": 0 }, { - "id": "63", + "id": "64", "x": 0, "y": 0 }, { - "id": "75", - "x": 985, - "y": 176 - }, - { - "id": "64", - "x": 150, - "y": 176 + "id": "54", + "x": 0, + "y": 0 }, { "id": "65", @@ -1744,127 +1869,211 @@ var bigBankPLC = `{ ], "relationships": [ { - "id": "72" - }, - { - "id": "81" - }, - { - "id": "86" + "id": "62" }, { - "id": "76" + "id": "56" }, { - "id": "85" + "id": "66" }, { - "id": "77" + "id": "58" } ] }, { - "softwareSystemId": "2", - "description": "An example development deployment scenario for the Internet Banking System.", - "key": "DevelopmentDeployment", - "paperSize": "A5_Landscape", - "environment": "Development", + "softwareSystemId": "7", + "key": "LiveDeployment", + "automaticLayout": { + "implementation": "Graphviz", + "rankDirection": "TopBottom", + "rankSeparation": 300, + "nodeSeparation": 300, + "edgeSeparation": 0, + "vertices": false + }, + "environment": "Live", "animations": [ { "order": 1, "elements": [ - "59", - "60", - "50" + "69", + "70", + "71" ] }, { "order": 2, "elements": [ - "51", - "52", - "53", - "54" + "67", + "68" + ] + }, + { + "order": 3, + "elements": [ + "77", + "78", + "79", + "72", + "73", + "74", + "75" ], "relationships": [ - "61", - "62" + "80", + "81", + "76" ] }, { - "order": 3, + "order": 4, "elements": [ - "55", - "56", - "57" + "82", + "83", + "84" ], "relationships": [ - "58" + "85" + ] + }, + { + "order": 5, + "elements": [ + "88", + "86", + "87" + ], + "relationships": [ + "89", + "93" ] } ], "elements": [ { - "id": "55", + "id": "88", "x": 0, "y": 0 }, { - "id": "56", + "id": "77", "x": 0, "y": 0 }, { - "id": "57", - "x": 1840, - "y": 834 + "id": "67", + "x": 0, + "y": 0 }, { - "id": "59", + "id": "78", "x": 0, "y": 0 }, { - "id": "60", - "x": 140, - "y": 664 + "id": "68", + "x": 0, + "y": 0 }, { - "id": "50", + "id": "79", "x": 0, "y": 0 }, { - "id": "51", + "id": "69", "x": 0, "y": 0 }, { - "id": "52", + "id": "90", "x": 0, "y": 0 }, { - "id": "53", - "x": 990, - "y": 494 + "id": "91", + "x": 0, + "y": 0 }, { - "id": "54", - "x": 990, - "y": 834 + "id": "70", + "x": 0, + "y": 0 + }, + { + "id": "71", + "x": 0, + "y": 0 + }, + { + "id": "82", + "x": 0, + "y": 0 + }, + { + "id": "83", + "x": 0, + "y": 0 + }, + { + "id": "72", + "x": 0, + "y": 0 + }, + { + "id": "84", + "x": 0, + "y": 0 + }, + { + "id": "73", + "x": 0, + "y": 0 + }, + { + "id": "74", + "x": 0, + "y": 0 + }, + { + "id": "86", + "x": 0, + "y": 0 + }, + { + "id": "75", + "x": 0, + "y": 0 + }, + { + "id": "87", + "x": 0, + "y": 0 } ], "relationships": [ { - "id": "61" + "id": "93" }, { - "id": "62" + "id": "80" }, { - "id": "58", - "position": 50 + "id": "81" + }, + { + "id": "92" + }, + { + "id": "76" + }, + { + "id": "85" + }, + { + "id": "89" } ] } @@ -1874,29 +2083,23 @@ var bigBankPLC = `{ "styles": { "elements": [ { - "tag": "Element" - }, - { - "tag": "Software System", - "background": "#1168bd", - "color": "#ffffff" + "tag": "Person", + "color": "#ffffff", + "fontSize": 22, + "shape": "Person" }, { - "tag": "Container", - "background": "#438dd5", - "color": "#ffffff" + "tag": "Customer", + "background": "#08427b" }, { - "tag": "Component", - "background": "#85bbf0", - "color": "#000000" + "tag": "Bank Staff", + "background": "#999999" }, { - "tag": "Person", - "background": "#08427b", - "color": "#ffffff", - "fontSize": 22, - "shape": "Person" + "tag": "Software System", + "background": "#1168bd", + "color": "#ffffff" }, { "tag": "Existing System", @@ -1904,8 +2107,8 @@ var bigBankPLC = `{ "color": "#ffffff" }, { - "tag": "Bank Staff", - "background": "#999999", + "tag": "Container", + "background": "#438dd5", "color": "#ffffff" }, { @@ -1921,22 +2124,21 @@ var bigBankPLC = `{ "shape": "Cylinder" }, { - "tag": "Failover", - "opacity": 25 - } - ], - "relationships": [ + "tag": "Component", + "background": "#85bbf0", + "color": "#000000" + }, { "tag": "Failover", - "position": 70, "opacity": 25 } - ] + ], + "relationships": [] }, "terminology": {}, - "lastSavedView": "Components", "themes": [] }, + "customViews": [], "filteredViews": [] } }