Support > Repository > Features of Designer/Other tools > Output of design document
ja | en

I will explain how to use tools to output external design documents from the repository. R7.1.1

It is a function to output the application repository (design information) as Excel format file.It is intended to print and use it.

Figures 1 to 4 show examples of Excel files output by this tool.

Figure 1 Model name list
Figure 2 Model item list (prepared for each model)
Fig. 3 Menu list
Figure 4 Screen definition list (prepared for each model)

Here, we will explain how to use in Windows OS.Please use the console when operating on Linux/Mac OS X.

Enter "cmd" in the "Start menu> Search program and file" column and execute it.(FIG. 5, FIG. 6)

Figure 5 Start Menu
Fig. 6 Execute "cmd"

A command prompt is displayed as shown in Figure 7.

Figure 7 Command Prompt
You can also execute "command prompt" directly without going through the start menu.

When the command prompt starts, move the current folder with the cd command.The destination is Wagby installation folder \ wagbydesigner \ bin.(Please read the installation folder properly.)

Fig. 8 Changing the current folder

Execute Spec.jar included in this folder with the java command.

java -jar Spec.jar
Figure 9 Run Spec.jar

The design document is output.(FIG. 10, FIG. 11)

Fig. 10 Output of design document (1)
Figure 11 Output of design document (2)

A file is created in the wagbydesigner \ bin \ spec folder.(FIG. 12)

Figure 12 Completed Generated Files

The following documents are automatically generated.

  • Front page
  • change history
  • System information
  • Model name list
  • Definition for each model item
  • Menu list
  • Form list
  • Screen definition for each model
  • Customized file list
Screen capture is not automatically executed.Please paste the screenshot into the generated "screen definition" and complete it.

All documents are output in Excel format.You can customize the layout by modifying the template file.

Template files are available in the wagbydesigner \ bin \ spec \ template folder.

Example Add output field of model item

Wagby At shipment, the model item output is limited to 100 items.You can increase this by following steps.

  1. Open modelitem_list.xls in wagbydesigner \ bin \ spec \ template with Excel.
  2. By default, up to 100 templates are prepared.Please increase this field as many as you need.

Example Outputting an automatic calculation formula

Available in modelitem_list.xls.Please include the following placeholder.(It is not included in the standard)

$ {Modelitem [number]/autocalc}

Example Output user-defined input check expression

Available in modelitem_list.xls.Please include the following placeholder.(It is not included in the standard)

$ {Modelitem [number]/generic_check [1-5]}
$ {Modelitem [number]/generic_check/errormsg [1-5]}
$ {Modelitem [number]/generic_check/@ warning [1-5]}

You can specify generic_check1 through generic_check5.
Generic_check/errormsg is the error message string.
Generic_check/@ warning indicates whether to use as a warning.

For the autocalc and generic_check, the simplified notation introduced here can be used.If you want to use other repository information, read the next section.

"Definition for each model item (template file modelitem_list.xls)" can output values ​​of all repository keys for model items.

The format is as follows.

$ {Modelitem [number]/repository key}

Description example

Character count check

$ {Modelitem [number] /model/modelitem/limit}

Initial value (when searching)

$ {Modelitem [number] /model/modelitem/defaultValue[@action=select]_2}

Combine applied placeholders

Here is an example of adding the maximum number of input characters and units (full-width/half-width) after the type information.We will output the contents of the next input restriction.

  • Maximum input characters
  • Count unit of characters (full-width/half-width)

Specifically, we will assume "string (20) full-width" output.

Bin/spec/template/modelitem_list.xls "item type" as follows.

${modelitem[0]/@type} ${modelitem[0]/model/modelitem/limit} (${modelitem[0]/model/modelitem/limit_2})

We fill in such placeholders for all 0, 1, 2, ... items.

I will explain the example above.We will consider improving the following two points.

  • In the previous method, "int 10 (char)" is output when there is a value, but "int ()" is not obtained when there is no value.
  • It is cumbersome to modify the template and add placeholders to each line.

To solve this problem, you can create your own program that processes output strings using the JavaScript language.I will explain this method.

  1. Prepare the wagbydesigner/bin/spec/js folder.
  2. Prepare the "template file name +". Js "" file.For example, the model item output is modelitem_list.js.The character encoding at the time of saving should be UTF 8 format.
  3. Prepare the function process () in this file.In the functionmapYou can use the variable named.This is a map where the key is a placeholder and the output string is stored in the value.Within this function we will process this map.

Example Add the maximum number of input characters and units (full-width/half-width) after type information

Prepare the wagbydesigner/bin/spec/js/modelitem_list.js file.We will have the following contents.

function process() {
  /*var stdout = java.lang.System.out;*/
  var size = map.get("__maxmodelitem");
  for (i=0; i<size; i++) {
    var s = map.get("${modelitem["+i+"]/model/modelitem/limit}");
    if (s != "" && s != null) {
      s = " (" + s + ")";
      var s2 = map.get("${modelitem["+i+"]/model/modelitem/limit_2}");
      if (s2 != "" && s2 != null) {
        if (s2 == "char") {
          s = s + " 全角";
        } else {
          s = s + " 半角";
        }
      }
      var type = map.get("${modelitem["+i+"]/@type}");
      map.put("${modelitem["+i+"]/@type}", type+s);/* override */

      /*var ret = map.get("${modelitem["+i+"]/@type}");
      stdout.println(i+":type="+ret);*/
    }
  }
}

This script is executed when outputting the design document.This calls modelitem [N]/@ typeThe value is rewritten.Specifically, the output value that was "string" by default is "string (10) full-width" and so on.

You can reset the existing value of the placeholder as it is, so you can reduce the trouble of modifying the template file.Other explanations are as follows.

  • The variable stdout is for standard console output.Although commented out in the example above, please use it when debugging.
  • Only variables named map are passed to function ().Other variables are declared by developers and please use.
  • The map contains special values ​​beginning with "__".This indicates the number of stored keys.[To be described later]

Number stored

The number of storage can be acquired with a variable beginning with "__".

file nameDescriptionKey name
list_screen.jsScreen definition list - list screen system __maxcondition: Number of search conditions.Such as condition [N]/@ name.
__maxlist: Number of listings.List [N]/@ name and so on.
menu_list.jsMenu list __maxmenu: Number of menus.Menu [N]/@ desc and so on.
modelitem_list.jsModel item list __maxmodelitem: Number of model items.Modelitem [N]/@ name and so on.
model_list.jsModel name list __maxmodel: Number of models.Model [N]/@ modelId and so on.
report_list.jsForm list __maxprintlayout: Number of forms.Printlayout [N]/@ filename and so on.
show_screen.jsScreen definition list - Detail screen system __maxmodelitem: Number of model items.Modelitem [N]/@ name and so on.

The startup options are as follows.
Application example: java - jar Spec.jar - help

optionDescription
-helpDisplay a list of options that can be specified.
-debugIt starts up in debug mode.
-renumbersortOutput "list display> sort" in the design document page of the screen definition list in the same format as Wagby R6.
(A sort order is sorted based on the numerical value entered in Designer and it is renumbered in the order of 1, 2, ..)
-x2ajOutput appschema.xml (in Wagby R6 format).The design document itself is not output.