The Web Publisher 2.0 report template comes with predefined variables and their values. Before generating a report based on the Web Publisher 2.0 template, you can add more variables to it, edit the existing ones, or delete those you do not want to include in your report. 

Report variables of Web Publisher 2.0

The following table shows the variable names and values of the Web Publisher 2.0 template.

VariableValue
AuthorThe report's creator.
TitleThe report's title.
HomeImage

Possible values:

  • Leave it empty or unspecified to use the MagicDraw icon as the homepage image.
  • Enter a diagram name (plain text) to display the selected diagram as the homepage image, for example, Software Development Process.
  • Enter “mdel://” followed by a model element ID to display the element as the homepage image, for example, mdel://_10_0EAPbeta2_8740266_1126593738250_35764_172”.
  • Enter the location of an image file on your computer to display the image as the homepage image, for example, “file://d://picture//image.jpg”.
  • Enter the location of an image on the Web to display the image as the homepage image, for example, http://www.photobucket.com/image.jpg.


Diagram as the homepage image
UseContextMenu

True: Shows a context menu when right-clicking a diagram element.

False: Shows an element specification or opens an element, a diagram, or a page specified in any existing active hyperlink when right-clicking a diagram element.

SelectHistoryNode

True: Selects a node when you move backwards or forwards.

False: Type "false" if you want it another way.

ExportLinkedFile

True: Copies a linked file from a model hyperlink into an output report folder.

False: Keeps the link to an absolute path only.

ShowAppearsInPage

True: Shows data in a report, and opens the Appears in tab when clicking an element in the Containment tree or a diagram pane. 

False: Hides the Appears in tab in a generated report.

AutoNavigateHyperlink

True: Automatically navigate the active hyperlink of each element. For example, if A has an active hyperlink to B and B has an active hyperlink to C, then C will be shown when you click A.

False: The behavior of navigation to active hyperlink is the same as that of MagicDraw. For example, if A has an active hyperlink to B and B has an active hyperlink to C, then B will be shown when you click A. 

DisplayTreeElementId

True: Shows the property ID of an element in the Containment tree.

False: Type "false" if you want it another way.

SVGDiagramResizable

True: Resize SVG images when the browser is minimized.

False: Enable SVG image linkable capability, but the resizable capability would be disabled.

If the "SVGDiagramResizable" is set to True, the SVG image would be resizable on web browser, but it would not be linkable.


The following section contains the instructions on how to work with your Web Publisher report.

 

  1. Open the Magic Library.mdzip sample project from the <MagicDraw_home>/samples/case studies directory.
  2. Click Tools > Report Wizard. The Report Wizard dialog will open.

    Selecting Web Publisher 2.0 Template
  3. In the Select Template pane, select Default Template > Web Publisher 2.0, and click 

  4. You can either:

    •  select the built-in report data or click  to create a new one. Type the new report name and description, and then click .

      • In the Select Report Data pane, you can create a new set of Report Data for the Web Publisher template. The Report Data is a container for a set of custom-defined fields in the template. It can be used to group different report versions.
      • To edit or create a variable in the report data by clicking , edit or delete information for predefined custom fields or create a new one, and click .

  5. Click .
  6. Select the element(s) from the model that you want to include in the report data, and click . Select the scope of the report in the open package tree. Select the Model package if you want to have a web-based report of your entire project.

    Selecting the Scope of the Web Publisher 2.0 Report


  7. Click .
  8. Click the button to locate the report file location.

  9. Select the file location, type the report name, and click . A generated web report will include a number of folders and files.

  10. Select the report image format: *.png*.jpg or *.svg.

  11. Select an option to display empty value information, either Empty text or Custom text.

    In some cases, the query may return an empty value that creates blank fields in the report. The Display empty value as option is useful when you have a standard representation for blank fields.


  12. Select the  check box to open the report document with the default editor.

  13. After all options have been selected, click .

  • Click the CONTAINMENT menu to hide it, and click it again to show it.
Hiding the Containment Menu
Hiding the Containment Menu.
  •  Click the “+” button in the Containment tree to expand it, or click the “-” button to collapse it.
Expanding and Collapsing the Containment Tree
The button to expand or collapse the Containment tree.
  • Drag the separator line between the containment and the content panel to reduce or increase the width of the Containment tree.

The Web Publisher 2.0 report interface uses a horizontal scrollbar, which appears when the length of an element's name exceeds the current width of the Containment tree. The default width of the containment tree is 20% of the web browser width.

  •  Click and re-click the arrow button to show and hide the contents.
Showing and Hiding Element Contents
Showing and hiding element contents
  •  Click a diagram's element to show the shorcut menu for opening its specification, Active Hyperlink, Hyperlink, submachine of state, or behavior of the call behavior action.
Web Publisher 2.0 Context Menu
Web Publisher 2.0 context menu

You can add an active hyperlink to any symbol on a diagram. There are three kinds of hyperlinks: Element, File, and URL. However, the Element type hyperlink is available for the Active Hyperlink column on the Generic Table diagram image only.

Note

The Web Publisher 2.0 report does not display the Generic Table diagram containing 10,000 elements or more due to the excessive size of the diagram image, making it unable to be rendered and empty.

You can navigate to the target if you double-click the hyperlink on the diagram in the Web Publisher report. The following figure below shows the Submachine State hyperlink in the Web Publisher report.

The Submachine State hyperlink in the Web Publisher report.

If you double-click the Submachine State in the above example, it navigates to the target and opens it for you as shown in the following figure.

The hyperlink navigates to the target in the Web Publisher report.

MagicDraw elements in the Active Hyperlink column in the Generic Table diagram link to the associate elements. If you click an element in this column, you will be navigated to the Specification page of the associated element.

Note

Only MagicDraw element type is available. File and URL address cannot navigate to the associated artifacts.

MagicDraw elements in the Active Hyperlink column in the Generic Table diagram links to the associated MagicDraw elements in the Specification page.
  1. Click Tools > Report Wizard > Variable to open the Report Variable dialog.
  2. Select the DisplayTreeElementId variable and enter the value true.
  3. Click OK to show the requirement property IDs in the Containment tree.

    The Requirement Property IDs in the Containment Tree in MagicDraw

    The requirement property IDs also appear in the Containment tree of Web Publisher.

    To display ID Property in the Web Publisher 2.0 report containment tree
  •  Click the MagicDraw Web Publisher 2.0 at the top-left corner of the screen to go to the index page.

Shortcut to the index page
  •  On the Specification tab, move your mouse over an element to see the description in a tooltip.
Showing Element Description
Showing an element description
  • In the Specification tab, select Standard, Expert, or All from the Mode drop-down menu. The mode appears in the property visibility depends upon the mode that you have selected in MagicDraw.

    Property Visibility Mode Types
    Property visibility mode types
  •  Click an Activity, State Machine, Collaboration, or Interaction diagram to open a sub-diagram associated with an element.

Opening Activity, State Machine, Collaboration, or Interaction Diagram

Clicking a diagram name to open its subdiagrams
  • Double-click either a state with a Submachine or a call behavior action of which behavior is specified. For example, double-clicking the last Submachine State Request Access : Connection in the following figure.


Double-clicking a State with Submachine.

When you double-click it, the associated diagram opens (see the following figure).


State machine diagram viewed in web publisher interface.

 

On this page

The sample model used in the figures of this page is Magic Library that comes with MagicDraw. To open the sample properly you need to install MagicDraw and:

  • Download Magic Library.mdzip or find in the modeling tool <modeling tool installation directory>\samples\case studies\Magic Library.mdzip.