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.
Variable | Value |
---|---|
Author | The report's creator. |
Title | The report's title. |
HomeImage | Possible values:
|
| |
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. |
ShowAppliedStereotypes | True: Shows applied stereotypes of elements in the Containment tree. False: Does not show applied stereotypes of elements in the Containment tree. |
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. |
SkipElementContext | True: Skips the iteration of all elements to create velocity context classified by customized stereotypes, e.g., $CustomizedStereotypeName. False: Does not skip the iteration of all elements to create velocity context classified by customized stereotypes. |
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. |
ExportedImageSize | The percentage (from 10 to 1000) of an exported image size. |
The following section contains the instructions on how to work with your Web Publisher report.
To generate a Web Publisher report
- Open the Magic Library.mdzip sample project from the <modeling_tool_home>/samples/case studies directory.
Click Tools > Report Wizard. The Report Wizard dialog will open.
In the Select Template pane, select Default Template > Web Publisher 2.0, and click .
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 .
- Click .
- 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.
- Click .
Click the button to locate the report file location.
Select the file location, type the report name, and click . A generated web report will include a number of folders and files.
Select the report image format: *.png, *.jpg or *.svg.
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.
Select the check box to open the report document with the default editor.
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.
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.
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.
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
- Click Tools > Report Wizard > Variable to open the Report Variable dialog.
- Select the DisplayTreeElementId variable and enter the value true.
Click OK to show the requirement property IDs in the Containment tree.
The requirement property IDs also appear in the Containment tree of Web Publisher.
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 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
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.
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.
Related page