Creating a report including the names of actors, use cases, and diagram images

This section will use part of the Inventory Control System.mdzip file as an example to illustrate how to reference to MagicDraw elements in a report. This example contains several packages. For instance, if you want to use the 'Use Case View' package, you need to know the elements inside the package before using it. To do this, follow the instructions in the previous section, Creating your first template.

The 'Use Case View' package contains three element types: Actor, UseCase, and Diagram that you can name in a template by typing "$Actor," "$UseCase," and "$Diagram" respectively. The following example shows you how to create a report that will print the names of the Actors, UseCases, and diagram images.

 

How to create a report that includes the names of Actor, Use Cases, and diagram images

  1. Open Microsoft Word or OpenOffice.org Writer.
  2. Use the #foreach directive to iterate through $Actor, $UseCase, and $Diagram.

    A Rich Text Format Template
    Using #foreach directive to iterate through $Actor, $UseCase, and $Diagram in a Rich Text Format template

  3. Use Report Wizard to add the template to MagicDraw.
  4. With the "Inventory Control System.mdzip" project open, open the Report Wizard dialog and select your template.
  5. Select the element scope so it covers only the "Use Case View" package.


    Selecting the Use Case View package from the model as the element scope to be included in the report


  6. Complete all steps in the Report Wizard dialog, and generate the report. The output will be shown as in the following figure.


    Shows a partial report output. A full report will print all the names of the Actors, Use Cases, and the Use Case diagrams

 

On this page

Glossary

 

An actor models a type of role played by an entity that interacts with the subjects of its associated use cases, e.g., by exchanging signal and data. Actors may represent roles played by human users, external hardware, or other systems.

An element is the abstract root UML metaclass. It has no superclass in the hierarchy of UML elements. It is the superclass for all metaclasses in the UMLinfrastructure library. There is no general notation for an element. The specific subclasses of an element define their own notation. Each UML element has a composition relationship to itself to support the capability for elements to own other elements.

UseCase is a specification of behavior. A use case is a kind of BehavioredClassifier that represents a declaration of a set of offered Behaviors. Each use case specifies some behavior that a subject can perform in collaboration with one or more actors. A UseCase may be owned either by a Package or by a Classifier. Use cases are a means to capture the requirements of systems,( i.e. what systems are supposed to do).

 

More information about creating report templates

To learn more about working with report templates, visit the following pages:

Creating Your First Template

Linking report templates to MagicDraw

Exercise: Building a simple class diagram report