Support > Repository > Features of Designer/Other tools > Generate repository from kintone's design information (beta version)
ja | en

I will explain how to semi-automatically generate Wagby's repository from kintone's design information (CSV).

By writing the design information of the "kintone" application provided by Cybozu as described on this page, you can convert it to Wagby's repository.

Files to prepareRequiredDescription
Model ID.csv1 file = 1 model definition.
Model ID - Container name. Csv-Define the item information included in the model.
master.csv-It corresponds to Wagby's choice model.

We will explain the detailed format of each file from the next section.

The "model ID.csv" file constitutes one model definition with one file.The contents are as follows.

ColumnDescription
labelitem name.Japanese notation.
typeType.(Described later)
codeItem ID.Alphanumeric notation.

The first line is treated as a header.Please write "label, type, code". From the second line onwards, describe the model item information.Here is an example.

label,type,code
氏名,SINGLE_LINE_TEXT,ApplicantName
氏名かな,SINGLE_LINE_TEXT,ApplicantNameKana

Placing in the menu

The model provided in model ID.csv is placed in the menu tab "Service".

Other rules

  • Since the file name becomes the model ID, Wagby conforms to the "name that can be used as a model ID" rule.Example: customer.csv.Detail is"Naming convention of model IDPlease read.
  • Wagby's "model name (Japanese)" is the same as the model ID.After conversion, specify the model name using Wagby Designer.
  • When "label" is enclosed in single quote, the part excluding single quotes becomes valid.Example: If you mention "name", the single quotes around it are excluded.
  • Please make "code" alphanumeric notation.When it is written in Japanese, it is automatically replaced "item + number (serial number)" internally.
  • "Code" is the model item ID, so Wagby conforms to the "name that can be used as item ID" rule.Detail is"Item ID naming conventionPlease read.

Please specify one of the following for "Type" described in "Model ID.csv" file.

InscriptionTypes when importing to Wagby
RECORD_NUMBERNumber (integer), Primary key.
SINGLE_LINE_TEXTString type
NUMBERNumber (integer)
MULTI_LINE_TEXTString type (text area)
RICH_TEXTString type (text area/rich)
CHECK_BOXReference to choice model (checkbox)
RADIO_BUTTONReference to choice model (radio button)
DROP_DOWNReference to choice model (list box)
FILEString type (file)
LINKString type (URL)
DATEDate type
TIMETime type
DATETIMEDate and time type
CREATORFixed value - registered user
CREATED_TIMEFixed value - registration time
MODIFIERFixed value - Update user
UPDATED_TIMEFixed value - Update time
SUBTABLERepeat container * mentioned later
RECORD_NUMBER is the primary key.Please prepare only one.
The format other than those indicated above is unsupported.

master.csv

Wagby'sOption modelYou can prepare. The file name is "master.csv".The contents are as follows.

ColumnDescription
labelitem name.Japanese notation.
typeType.
codeItem ID.Alphanumeric notation.
optionsThe value of the choice.

Here is an example.The first line is the header line "label, type, code, options".We will describe the actual data on the second and subsequent lines.

label,type,code,options
性別,DROP_DOWN,Gender,男
性別,DROP_DOWN,Gender,女
職業,DROP_DOWN,Job,会社員
職業,DROP_DOWN,Job,学生
職業,DROP_DOWN,Job,主婦

In this way, please connect lines with the same label, type, code and different options.

Relationship with model ID.csv

If the code part of model ID.csv matches the code part of master.csv, this item is linked with the option model (prepared by master.csv).

For example if you have the following line in customer.csv:

性別,DROP_DOWN,Gender

In order to link with "Gender" of master.csv, you can choose the option "man" "woman" in list box format.

Placing in the menu

The choice model prepared in master.csv is placed in the menu tab "Master Management".

The "subtable" of kintone is migrated as Wagby's "repeating container".

Model ID - Container name. Csv

"Container name" is alphanumeric.

ColumnDescription
fields_nameItem name described in model ID. Csv.
labelitem name.Japanese notation.
typeType.
codeItem ID.Alphanumeric notation.

Here is an example.Let the file name be customer-operator.csv. The first line is the header line "fields_name, label, type, code, options".I will describe the actual definition in the second and subsequent lines.

fields_name,label,type,code
OperatorTable,操作日時,DATETIME,OperatorDate
OperatorTable,操作内容,MULTI_LINE_TEXT,OperatorMemo

Relationship with model ID.csv

If the type of the model ID. Csv is SUBTABLE and the code part matches the fields_name part of the model ID - container name. Csv, the sub table item is set as the "repeating container" at that position in the model ID. Csv It is inserted.

For example if you have the following line in customer.csv:

,SUBTABLE,OperatorTable

The four items listed as "OperatorTable" in customer-operator.csv will now be included in that location of customer.csv.

Notes

  • The code part of the sub table definition (customer - operator.csv in the above example) corresponds to "item ID" of Wagby, so it should not be duplicated.Specifically, it should not overlap with any item name (code part) of model ID. Csv.

Execution method

  1. Create a folder named "kintone" in the misc folder right under the Wagby installation folder (Wagby - 7.xx).
  2. Place the csv file described above in the kintone folder.
  3. Open the DOS prompt.
  4. Go to the Wagby-7.xx \ misc folder.
  5. Execute the following command.
    java -jar RepositoryConverterCUI.jar kintone
    
  6. A message is output to the console and the logs folder and it ends.
  7. Please start WagbyDesigner and check the converted repository.

Sample setting information

kintone_sample.zip Is prepared.Please create a kintone folder in the misc folder directly under the Wagby installation folder (Wagby - 7.xx), and expand it there and use it.

To correct it manually

  • Field lengths, NOT NULL constraints, expressions, etc. are not migrated.Please set it again in Wagby Designer.
  • When model ID (English) and item ID (English) are Japanese, "modelXX" and "itemXX" are automatically set respectively.XX is a number (serial number).
  • When model ID (English) and item ID (English) do not match Wagby's named rule, "modelXX" and "itemXX" are automatically set respectively.XX is a number (serial number).

With this tool (RepositoryConverter), the project is alwaysIt is treated as new. When applying to the project under development, "Generate repository from existing table definition> I want to incorporate a table definition of an existing system into a project under developmentPlease read the explanation.