Relations

Relations describe how elements interact with each other.

Relations

Relations describe how elements interact with each other. They are the lines connecting the boxes in your diagram.

Syntax

import { * } from 'sruja.ai/stdlib'


// Relations use element IDs
Source -> Destination "Label"
// When referring to nested elements, use fully qualified names:
System.Container -> System.Container.Component "Label"

Or with a technology/protocol:

Source -> Destination "Label" {
technology "HTTPS/JSON"
}

Example

import { * } from 'sruja.ai/stdlib'


BankingSystem = system "Internet Banking System" {
WebApp = container "Web Application"
DB = database "Database"
}

User = person "User"

User -> BankingSystem.WebApp "Visits"
BankingSystem.WebApp -> BankingSystem.DB "Reads Data"

Use clear, unique IDs to reference relation endpoints.

See Also