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.

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.

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.

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.

Push Changes from Sequence Diagram to Architecture Model

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

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

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

Retarget Lifeline and Create New Connection in Architecture Model

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

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.

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

Related Topics