Note

The Magic Library sample model, which comes with the modeling tool, is used in the figures on this page. You can find it in the modeling tool <modeling tool installation directory>\samples\case studies\Magic Library.mdzip.

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 absolute path of an image file on your computer to display the image as the homepage image, for example, file://d://picture//image.jpg.
  • Enter the relative path of an image file on your computer to display the image as the homepage image. The relative path starts at the location of the Web Publisher 2.0 template: %APPDATA%\Local\.magicdraw\2021x\data\reports\Web Publisher 2.0\web (%APPDATA% is the location where the user's data are stored, for example, /images/homeimage.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: Types "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 navigates 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: Types "false" if you want it another way.

SVGDiagramResizable

True: Resizes SVG images when the browser is minimized.

False: Enables 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.

HexadecimalName

Creates an XML meta-data hexadecimal-based file name to shorten the length of the file name.

True: Generates an XML meta-data file name based on hexadecimal numbers.

False: Generates an XML meta-data file name based on an element ID.

GotoLinkByIcon

True: Both the icon and the label of the element in the Containment tree navigate to an active hyperlink.

False: The icon element navigates to the element's Specification tab even if there is an active hyperlink.

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


To generate a Web Publisher report


  1. Open the Magic Library.mdzip sample project from the <modeling_tool_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 .


To hide or show the Containment menu


  • Click the CONTAINMENT menu to hide it, and click it again to show it.
Hiding the Containment Menu
Hiding the Containment Menu.

To expand or collapse the Containment tree


  • Click the “+” button in the Containment tree to expand it, or click the “-” button to collapse it.

The button to expand or collapse the Containment tree.

To reduce or increase the Containment tree width


  • 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.

To show or hide element contents


  • Click and re-click the arrow button to show and hide the contents.

    Showing and Hiding Element Contents

    Showing and hiding element contents.


To show an element specification, active hyperlink, Submachine of state, or behavior of the Call Behavior action


  •  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.


To add an Active Hyperlink to a model


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.

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 element type is available. File and URL address cannot navigate to the associated artifacts.

Elements in the Active Hyperlink column in the Generic Table diagram links to the associated elements in the Specification page.


To display a property ID in the Containment tree


  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


To go to the index page


  • Click the Web Publisher 2.0 at the top-left corner of the screen to go to the index page.

Shortcut to the index page.


To see the description of an element


  • On the Specification tab, move your mouse over an element to see the description in a tooltip.

    Showing Element Description

    Showing an element description.


To show property visibility of your report


  • 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 the modeling tool.

    Property visibility mode types.


To open an Activity, a State Machine, a Collaboration, or an Interaction sub-diagram


  • Click an Activity, State Machine, Collaboration, or Interaction diagram to open a sub-diagram associated with an element.

Clicking a diagram name to open its subdiagrams.



To open the sub-diagrams of a state with Submachine


  1. 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.



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

    State machine diagram viewed in web publisher interface.
  2. Click the “+” button in the Containment tree to expand it, or click the “-” button to collapse it.

The button to expand or collapse the Containment tree.