コンポーネントとユースケースを記述したデータから見たい粒度の図を生成する
import {CompoComp} from "https://naosim.github.io/CompoComp/CompoComp.js";
const list = [];// 要定義
const models = CompoComp.createModels(list);
const options = {
title: '他社状況同期のシステム関係図',
aggregateType: 'aggregate', // none, aggregate, aggregateWithoutBoundary
bucFilter: ['他社状況同期'], // bucの指定
displayUsecaseName: false // ユースケース名の表示
};
const plantuml = CompoComp.toPlantUml(models, options);
console.log(plantuml);
※例はyaml
key | 型 | 必須 | 説明 |
---|---|---|---|
type | string | o | 固定値:system |
id | string | o | システムID |
name | string | システム名。未定義の場合はidがnameになる | |
actorType | string | アクタータイプ。system, boundary, その他plantumlのアイコンで使える値。未設定の場合はsystemになる | |
place | string | システムの場所 |
例
type: system
id: サービス管理
name: サービス管理
key | 型 | 必須 | 説明 |
---|---|---|---|
type | string | o | 固定値:component |
id | string | o | コンポーネントID |
name | string | コンポーネント名。未定義の場合はidがnameになる | |
systemId | string | o | システムID。親。 |
actorType | string | アクタータイプ。system, boundary, その他plantumlのアイコンで使える値。未設定の場合はsystemになる | |
place | string | システムの場所 |
例
type: component
id: サービス管理メイン
name: サービス管理メイン
place: AWS
systemId: サービス管理
actorType: system
style:
fill: ff0
key | 型 | 必須 | 説明 |
---|---|---|---|
type | string | o | 固定値:buc |
id | string | o | BUCID |
name | string | o | BUC名 |
例
type: buc
id: 入会
name: 入会
key | 型 | 必須 | 説明 |
---|---|---|---|
type | string | o | 固定値:suc |
id | string | o | BUCID |
name | string | o | BUC名 |
systemId | string | o | 関係するシステムID(主語) |
buc | string[] | o | 関係するBUC。複数。 |
dependences | (sucId | SubUsecase)[] | 関係するユースケース。アクセス先SUC、または、ここで直接定義するユースケース。 |
例
type: suc
id: サビ管メイン_申込
name: 申込
systemId: サービス管理メイン
buc:
- 入会
dependences:
- 他社連携_申込
システムとコンポーネントのスタイル
key | 型 | 必須 | 説明 |
---|---|---|---|
type | string | o | 固定値:componentStyle |
componentId | string | o | 対象のコンポーネントID |
name | string | 名前 | |
style | object | o | |
style.fill | string | 背景色。ff0のように指定する。(#はいらない) | |
style.stroke | string | 線の色。ff0のように指定する。(#はいらない) |
SUCの中で使うオブジェクト。
key | 型 | 必須 | 説明 |
---|---|---|---|
systemId | string | o | 依存先のシステムID または コンポーネントID。ただしコンポーネントIDの方が表示の不整合が起きにくい |
uc | string | o | ユースケース名 |
deno bundle ./src/CompoComp.ts ./docs/CompoComp.js