Five verified exercises

Classes, sequences, canonical copy, source recovery and portable Workspace.

1. Class diagram for order management

  1. Create New class diagram and add Order and Line with Add class…. Add Repo with Add interface….
  2. Add the attribute - totale: Euro to Order and the operation + cerca(id: int): Ordine to Repo. Create a realization from Order to Repo with marker end and a composition from Order to Line with marker start.
  3. Check the triangle towards Repo, the filled diamond on Order and the multiplicity 1 / 0..*. Use Publish New…, save any later revision with Save Existing and reopen the ID.

Synthetic model of this guide. Download the source ordini.puml (ZIP).

The class model published as a UML Dataset.
The class model published as a UML Dataset.

2. Consultation sequence with branches

  1. Create New sequence diagram. Add the actor Reader and the participants App and Store.
  2. Add a synchronous request Reader → App, an asynchronous one App → Store, a reply Store → App and a call App → App.
  3. Wrap the asynchronous request and the reply in Add control frame… with alt. Insert else non trovato between the messages in Source and check the separator in the drawing.

Synthetic consultation scenario. Download the source catalogo.puml (ZIP).

The alt, opt and loop frames were tested on the messages of the sequence.
The alt, opt and loop frames were tested on the messages of the sequence.

3. Import a source and work on an independent copy

  1. Import catalogo.puml from Text and Source Code Import with Destination dataset and Import as auto. Assign catalogo_importato.
  2. Open the ID with Open UML Dataset…. Check that replacing the acquired original is unavailable.
  3. Use Publish New… with ID catalogo_copia. Check that both IDs are present and that the copy is open.
The active identity is the copy just published.
The active identity is the copy just published.

4. Export and fix an invalid draft

  1. Open a new sequence and paste the small synthetic example verifica.puml (ZIP). Use Refresh diagram.
  2. Insert a line usecase ProvaFuoriProfilo right after the family comment. Show Diagnostics and check the line number. The diagram keeps the last valid source, identified by its fingerprint.
  3. Choose Export source… to keep the raw draft. Delete only the unsupported line and check the return to Sequence diagram — current source.
Checking an out-of-profile construct keeps the source and the previous drawing.
Checking an out-of-profile construct keeps the source and the previous drawing.

5. Save a sequence draft in a portable Workspace

  1. Create a new Workspace. Create a sequence with the actor Reader, the participant Catalog and a message Reader -> Catalog : cerca.
  2. Use Workspace → Save. Check that the status still indicates a draft and that no new Dataset appears in the Session.
  3. Use Export… to create the ZIP. Import it with the name Catalogo portatile and reopen the Workspace from the manager. Check that the sequence and the draft condition are restored.
The draft is kept in the Workspace, separately from the canonical Dataset.
The draft is kept in the Workspace, separately from the canonical Dataset.