Main Content

Synchronize Sequence Diagrams and Architecture Models

This example shows how to maintain consistency between sequence diagrams and an architecture model.

Open the model.

model = systemcomposer.openModel("mRetargetElements");

Open the Architecture Views Gallery.

openViews(model)

Pull Changes from Architecture Model to Sequence Diagram

1. In the View Browser, select the RepairExample sequence diagram. Inspect the lifeline named ChildComponent.

2021-12-30_11-42-56.png

2. Return to the model canvas. Marquee select the ChildComponent component. Pause on the ellipses (...) menu and select Create Subsystem. Specify the name of the new component as Component. The ChildComponent component is now the child of the Component component.

2021-12-30_11-52-53.png

3. Click Check Consistency on the sequence diagram RepairExample. The sequence diagram has become inconsistent and the ChildComponent lifeline is highlighted because it is no longer at the root level of the diagram.

2021-12-30_11-54-31.png

4. Select the ChildComponent lifeline and, on the toolstrip, click Repair. The sequence diagram RepairExample is updated after changes are pulled from the architecture model mRetargetElements.

2021-12-30_11-56-51.png

Push Changes from Sequence Diagram to Architecture Model

1. In the View Browser, select the CreateInArchitecture sequence diagram.

2021-12-30_12-07-08.png

2. Marquee select the contents of the sequence diagram, including the two lifelines and the message.

2021-12-30_12-08-50.png

3. In the toolstrip, click Create in Architecture. The architecture model mRetargetElements is updated after changes are pushed from the sequence diagram.

2021-12-30_12-10-28.png

Retarget Lifeline and Create New Connection in Architecture Model

1. In the View Browser, select the RetargetThenCocreate sequence diagram.

2021-12-30_12-17-44.png

2. Select the B lifeline on the sequence diagram and, from the Architecture Element menu, select C from the list. The sequence diagram becomes inconsistent, and the message is highlighted.

2021-12-30_12-19-41.png

3. Select the message and, in the toolstrip, click Create in Architecture. A new connection is created in the architecture model mRetargetElements.

2021-12-30_12-22-37.png

See Also

Tools

Functions

Objects

Related Topics