Support > Repository > Appendix

Detailed technical information on design information is summarized. (Detailed inquiries of the contents described here may be excluded from the standard support.Please ask the support desk for details.)

DDL creation rules

Wagby automatically generates DDL such as create table statement and drop table statement from model definition.This uses Hibernate's function.Specifically, it is generated from the Hibernate mapping file (.hbm.xml).

The order of items in DDL is not the item order of the model definition.It will be in the order of Hibernate mapping file.

DDL location

The automatically generated DDL file is saved in the following folder.

wagbydesigner/webapps/wagbydesigner/WEB-INF/env/work/dbschema/createddl/

Constraint name

Hibernate automatically generates the part of "drop constraint FKXXXX" which corresponds to FKXXXXX.Wagby does not control it in particular.

index

The index specification corresponding to the search condition can be confirmed with the following file.

wagbyapp/webapps/wagby/WEB-INF/export/conf/initdb.xml

You can check the contents of the file with a text editor.The following DDL is included.

CREATE INDEX "jfcidx_ModelID_ModelitemName" ON "ModelID"

The following words are reserved words and can not be used as item names.

Reserved words in Java

abstract
assert
boolean
break
byte
case
catch
char
class
const
continue
default
do
double
enum
else
extends
false
final
finally
float
for
goto
if
implements
import
instanceof
int
interface
long
native
new
null
package
page
private
protected
public
return
short
static
strictfp
super
switch
synchronized
this
throw
throws
transient
true
try
void
volatile
while
Alphabet Letters are not case sensitive.Both abstract, abstract and ABSTRACT are reserved words.
In future Java, reserved words may be added.Please note.

Other reserved words

action
and (JSTLで利用)
application
choose
content
css
customize
div (JSTLで利用)
empty (JSTLで利用)
error
errorcode
exception
eq (JSTLで利用)
ge (JSTLで利用)
gt (JSTLで利用)
help
hour_m
id
img
item
jpermission_m
jprincipal
jshparamを含む名前
juser
label
lt
minute_m
mod (JSTLで利用)
movestep_m
ne (JSTLで利用)
not (JSTLで利用)
now
out
or (JSTLで利用)
pageContext
request
response
session
system
xmlで始まる名前
WEB-INF

Name not available in Windows OS

When using Wagby Designer in Windows OS, the following names can not be used.

con
aux
prn
com1
lpt1

In Wagby, the repository (design information) is managed with the file name "name.txt".In Windows OS, the name con is reserved, so the file name con.txt will be an error.

Model name and model ID are also used as XML element names. Therefore, you can not specify characters that can not be used as XML names.

Specifically, the following rules apply.

  • The first letter can use letters such as half-width alphabets, full-width Hiragana, full-width katakana, kanji, "_ (underscore)", and so on.
  • In addition to the characters that can be used for the first character after the second character, you can use half-width numbers and so on.
  • Hankaku katakana, double-byte numerals, double-byte alphabetic characters, symbols can not be used.

For details of the characters that can be used as XML names, see W3C Recommendation of XML 1.0 (http://www.w3.org/TR/2004/REC-xml-20040204/#CharClassesPlease look at.

I will explain the details of the model included in the "System" tab.

System model list

Model nameModel IDUse
Result of batch job execution jfcbatchjob_execution It is effective when Spring Batch is used.The execution result of the job is stored.The registration process is done by the Spring Batch framework.It is not assumed (by Spring Batch) to update or delete it.It becomes exclusive for viewing during operation.
Batch job execution details jfcbatchjob_execution_context
Batch job execution parameters jfcbatchjob_execution_params
Batch job instance jfcbatchjob_instance
Batch step execution jfcbatchjob_execution
Batch step execution details jfcbatchjob_execution_context
Common Settings Preferences jfccspreferenceitem List display grid Used when common setting is used by multiple users.Data is registered at the timing when common settings are created.It becomes exclusive for viewing during operation.When updating or deleting, please operate the database directly.
Flow pattern jfcflow_setting It is used when using workflow.Stores the flow pattern.You can also add your own flow patterns during operation.
Graph settings jfcgraphsetting You can save the settings of the graph display and use it in common by other users.Data is registered at the timing when common settings are created.It becomes exclusive for viewing during operation.When updating or deleting, please operate the database directly.
Job master jfcjob Apart from Spring Batch, Wagby prepares a job by time designation.It stores the job list.Its contents are prepared beforehand when installing Wagby.
Job sched jfcjobschedule The schedule for executing the job prepared by jfcjob is stored.The operator can add and edit the job schedule.
License file jfclicenseholder Information on the production operation license file is stored.Usually, it holds one record.
mail template jfcmailtemplate The mail transmission settings are saved.Records are added as much as you set.
Definition model jfcmodel It holds the name of the predefined system model and user model and the amount of data.It is used as browsing only, not as a model operated by developers and operators.
Definition model jfcmodel4dm
Flow Participant Setting jfcparticipant_setting It is used when using workflow.Stores information about users or groups participating in the flow.It can be arbitrarily added during operation.
Flow participant container jfcparticipant_setting_node
Portal jfcportal It is used when using the portal.We keep only one record of whether to use portal or not.
Portlet jfcportlet It holds part information that can be displayed on the portal.Developers can extend and add their own portlets as well.
Portlet (graph color) jfcportletGraphColor_m It is used in graph portlet.It is fixed at installation and can not be expanded.
Portlet (graph type) jfcportletGraphType_m
Preferences jfcpreferenceitem It is prepared for each user (logon account juser).Information that should hold values ​​is stored even when logging off, such as sorting information of list display and column listing information of list display grid.Once re-logged on, it is prepared to restore the previous information.Number of registered accounts x Records are added by the number of information (key-value pair) to keep.Add, edit, and delete records are automatically done inside the system.
Delegate setting jfcproxy_setting It is used when using workflow.A record is added when proxy approval setting is done.
Form template jfcreporttemplate It is used when using Excel/PDF form.Records are added as many as you set.
Start flow state jfcstartworkstate It is used when using workflow.It is management information to know who is currently waiting for approval for the workflow that I applied.Records are prepared by the system.Even if the workflow ends, this record is kept in the database as a record, so the data volume will increase with operation.It is possible for the administrator to delete the old data manually.(Deleted data will be excluded from search.)
Pending flow status jfcsuspendworkstate It is used when using workflow.It is management information to investigate the workflow that you should approve.Records are prepared by the system.Even if the workflow ends, this record is kept in the database as a record, so the data volume will increase with operation.It is possible for the administrator to delete the old data manually.(Deleted data will be excluded from search.)
Workflow setting jfcworkflow_setting It is used when using workflow.We link the workflow definition model with the workflow definition model.Records are created as many times as you set up.
Flow Event jfcworkstate It is used when using workflow.Record events for workflow (approval, remand, decision, etc.).Records are prepared by the system.Even if the workflow ends, this record is kept in the database as a record, so the data volume will increase with operation.It is possible for the administrator to delete the old data manually.(Deleted data will be excluded from search.)
group jgroup Group information to be used inside the system.A record is added as many as the number of registered groups.
holiday jholiday It is holiday information used inside the system.Initial value is Japan holiday information "JapanHolidays.ics" is registered.Optional holidays can be additionally registered.
Notice jnews You can display announcements to users on the portal screen.Records will be added when using Notification portlet.
Principal jprincipal It is prepared for each user (logon account juser).Wagby's authorization function is realized.It is managed automatically within the system according to account registration and editing.
account juser It is a user (logon account).A record is prepared for the number of registered accounts.
order seq Holds the order (primary key) for each model.It is not prepared when the database provides sequence (ordering) service, such as Oracle or PostgreSQL.It is prepared only when you use a database that does not provide sequence such as MySQL.The system will manage it automatically.

System model constraints

The system model has the following restrictions.

  • Do not change the model ID.
  • Do not delete the model.
  • Model items included in the model should not be changed, including ID and type.

The following models can expand model items.

You can not change the defined items.Specifically, you can not change the item name or change the type.
Model nameModel IDUse
group jgroup Used for group authority management.It is linked with account (juser).
account juser Logon account.
Notice jnews A model that can notify users.

Models other than those described here can not be changed.Please use it at the time of installation. In Wagby's version upgrade, the latest model is applied when applying the migration tool (models belonging to "system" other than the model above).

When using a compound key, the Web form generated by Wagby handles data in the following format.

value1$SEP$value2$SEP$...

Where value1, value2 are the values ​​of primary key 1 and primary key 2, respectively."$SEP" is the value delimiter.

Implement optimism lock

We use the function provided by middleware called Hibernate that Wagby uses.However, it adopts the version method only, not the time stamp method.(We determined that the time stamping method is not strict.)

Implementation of pessimistic lock

We use Wagby's own lock manager.The key at lock acquisition is held in memory.You can also manage the lock key with the special internal table jfclockobject.In this case, you can know "which record is locked" from the external system.[Details are explained in the next section.]

About the database SELECT FOR UPDATE syntax

Several databases provide the "SELECT ... FOR UPDATE" syntax.But Wagby's lock does not use this function.I will explain the reason.

"SELECT ... FOR UPDATE" is a lock that is valid only within a transaction. However, the locking process described in this section is accompanied by user's operation, and the following operation is required.

  1. Open the update screen.(SELECT the data here.)
  2. The user edits the data.
  3. The data is updated by pressing the save button.(UPDATE the data.)

Transactions are different in 1. and 3. here.Processing that spans multiple transactions in this manner is generally treated as "long transaction".

It is different from database transaction.

For long transactions, "SELECT ... FOR UPDATE" can not be used. This syntax is not screen processing, it is assumed to be used in certain business processing logic.

"The execution of" SELECT ... FOR UPDATE "immediately after pressing the save button ..." can not prevent lost updating and can not be said to be a strict pessimistic lock.

In Wagby, these long transactions keep consistency, so we support both optimistic locks and pessimistic locks (using our own lock managers).

Wagby's "pessimistic lock" has a lock manager internally.This lock manager keeps locks in memory.This information can not be known from the outside.

We have an option to write this lock information in a (relational database) table.This makes it possible to know "which data is locked" from the external program, so you can control that the locked data is not updated.

Furthermore, by locking from the external program side, it is also possible to control so that Wagby side can not update it.

Definition method

Enable "Environment> Customize> Detail> Store lock information in database table".

Figure 1 Storing lock information in database table

Search lock information

When you log on as a system administrator and open the "Lock Information Search" screen on the management processing tab, the currently locked data is displayed as shown in Figure 2.

Figure 2 Search for lock information

Jfclockobject table

When setting is enabled, the jfclockobject table is prepared in the relational database to be used.

item name Primary key Description
modelname Model name to be locked (English)
pkey The value of the primary key of the data to be locked.In the case of a compound key, concatenate the value with "$SEP" as a delimiter.
lockForAll Numeric type."1" locks individual data."2" means locking of the entire model.
userid The userid value (of the juser account) that got the lock.
username The username value (of the juser account) that got the lock.
sessionid The session ID value of the user who acquired the lock.

At the timing of opening a data update screen, search the jfclockobject table and check whether there is a lock on the relevant data.If the lock already exists, the update screen can not be opened.If it does not exist, write lock information to the same table.Delete the lock information at the timing when update processing is completed.

Acquire lock from the outside

By adding lock information (record) from the external program to the jfclockobject table, you can prevent editing from the Wagby screen.

Please make sure that there is no lock target data in the table beforehand and add records.

Prepared in the jfclockobject tableFill in all the columnsit is necessary.If either one is not set (null), no lock is acquired.

The items modelname, pkey, lockForAll are required to point to the target data.
The items userid, username, and sessionid are necessary to record the information "who got the lock".

The item sessionid stores the session ID issued by the web application server.However, when setting this value from an external program, it is difficult to generate a session ID.For example, when Tomcat is used as the web application server, the session ID is a random character string of 32 characters.As a rule, if it is a unique character string it will work.

When setting values ​​from an external program, it is a good idea to decide some rules.For example, this value should be as follows.

$HOSTNAME$APPLICATIONNAME$SEQUENCEVALUE

By setting a pseudo session ID character string based on such a rule, it becomes easier to see who locked it while maintaining the uniqueness.

String type

The standard sizes of string types stored in the database are as follows.

Database Definition
Oracle varchar2(255 char)
SQL Server nvarchar(255)
DB2 varchar(255)
MySQL varchar(255) (*1)
PostgreSQL varchar(255)
HSQLDB (embedded DB) varchar(255)
1. The number specified by varchar type depends on MySQL version.Before 4.1, it is in "byte" unit, but after that it is in "character" unit.Please check the MySQL manual for details.

Numerical value

The standard sizes of numeric types stored in the database are as follows.

Database Type Definition
Oracle integer number(10,0)
1 byte integer number(3,0)
2 byte integer number(5,0)
4 byte integer number(10,0)
8 byte integer number(19,0)
4 byte floating point number float
8 byte floating point number double precision
SQL Server integer int
1 byte integer tinyint
2 byte integer smallint
4 byte integer int
8 byte integer numeric(19,0)
4 byte floating point number float
8 byte floating point number double precision
DB 2 integer integer
1 byte integer smallint
2 byte integer smallint
4 byte integer integer
8 byte integer bigint
4 byte floating point number float
8 byte floating point number double
MySQL integer integer
1 byte integer tinyint
2 byte integer smallint
4 byte integer integer
8 byte integer bigint
4 byte floating point number float
8 byte floating point number double precision
PostgreSQL integer int4
1 byte integer int2
2 byte integer int2
4 byte integer int4
8 byte integer int8
4 byte floating point number float4
8 byte floating point number float8
HSQLDB (embedded DB) integer int4
1 byte integer int2
2 byte integer int2
4 byte integer int4
8 byte integer int8
4 byte floating point number float4
8 byte floating point number float8

textarea

Wagby may modify the table definition of the related model if you change the text type item to the text area (or vice versa, canceling the text area designation).For example, if MySQL is used as the external database, varchar type is applied for normal character string type, text type is used for text area.

There is an upper limit of "number of characters that can be stored" in the item where the text area is specified.This varies depending on the database. To change this, please specify "type of table definition" directly.

DatabaseStringString (text area)
HSQLDB (embedded database)varchar(4000)varchar(4000)
PostgreSQLvarchar(255)text (*1)
Oraclevarchar2(255)varchar2(4000)
SQL Servernvarchar(255)nvarchar(1000)
DB 2varchar(255)varchar(4000)
MySQLvarchar(255)text (*2)
1. The PostgreSQL text type is 1 Gbyte.
2. The MySQL text type is 65,535 bytes.

Option model/list box/radio button

In the item referring to the model (reference source model), the ID value of the referenced model is held.It is not a content part.

When you check the table on the database, you can see that the ID value is stored.

Checkbox

Figure 3 shows an excerpt of the table structure of the account model (juser) that is provided by the standard.The "belonging group (jgroupid)" item refers to the model using the group model (jgroup) as a checkbox.This item does not exist in the juser table.Instead, a table named "juser $ jgroup" is created.

Fig. 3 Table image
  • The table name is "model name $ item name".
  • Holds the primary key of the juser table to which it belongs.
  • A column named "item name jshid" is automatically added.This is also part of the primary key.This is prepared as an index column for internal management.
  • The value of "item name jshid" starts from 0.Also there is no jump number.

In a state where none of them are selected, there is no data in another table.The value actually held (in the above example, the value of the jgroupid column) is the primary key of the referenced model (jgroup).

When operating the database directly, please observe the rule "item name jshid" starting from 0 and without jump number.In case of inconsistency, the check box item will not function.

Repeat item

Items with repeated attributes are split into separate tables.(It will be 1: N relationship.Therefore there is no upper limit on the number of data that can be registered.

Strictly, the theoretical upper limit is the number of records that can be held in one table of the external database to be adopted.Therefore, constraints in actual operation can be regarded as none.

The generated table is "model name $ item name".

Repeat container

Repeat containers are divided into separate tables.(It will be 1: N relationship.Therefore there is no upper limit on the number of data that can be registered.

Strictly, the theoretical upper limit is the number of records that can be held in one table of the external database to be adopted.Restrictions on actual operation can be regarded as none.

The name of the generated table is "model name $ (repeating container) item name".The naming convention for this table is fixed.

Repeating container fields are ignored even if physical columns are specified.

Repeating Container ID

Columns named "<container name> jshid" are prepared by default as "repeating container ID".Type is integer type.

  • "Repeat container ID" must be saved in the database.If you do not save the database, it will not work properly.
  • Values ​​are stored in "Repeat container ID" as serial number starting from "0" in the database.null is not acceptable.Also, no jump numbers are accepted.

You can specify the physical column of this "repeating container ID".

Specify the physical column of Figure 4 "Repeating Container ID"

I will explain how to create zipcode.dat using zip code data provided by Ibis Corporation and individual zip code data of business offices provided by Japan Post.

  1. "Zipcloud" provided by Ibisu Inc.And click the "download" link.This data is released free of charge.
    Figure 3 zipcloud
  2. Download "ken_allYYYYMM.zip" (YYYY is the year number, MM is the month) Renamed "ken_all.zip", Wagbyapp/webapps/wagby/WEB-INF/jmaster.
  3. Postal code search site of Japan Post http://www.post.japanpost.jp/zipcode/index.html Access the "Download zip code data" link.(It is updated once a month at the end of the month.)
    Fig. 4 Postal code search site
  4. Click the link to download the individual zip code of the business office.
    Fig. 5 Individual zip code download at the workplace (1)
  5. Click the link to download in zip format.
    Fig. 6 Individual zip code download at workplace (2)
  6. Click on the download link of the latest data, the file "jigyosyo.zip" will be downloaded.(The file size varies depending on the year and month.)
    Fig. 7 Individual zip code download at the office (3)
  7. Also download the downloaded "jigyosyo.zip" in wagbyapp/webapps/wagby/WEB - INF/jmaster.
    Figure 8 jmaster folder
  8. Stop the Wagby application.
  9. Launch the command prompt and go to the wagbyapp/webapps/wagby/WEB-INF folder.
    Enter the following command and execute it.
    java -cp lib/j_util.jar;lib/commons-lang.jar jp.jasminesoft.util.address.GenerateMasterData
    If the java command does not work,Installation of JavaFollow the instructions to install Java.

    It is output as follows.

    C:\Wagby-8.x.x\wagbyapp\webapps\wagby\WEB-INF>java -cp lib/j_util.jar;lib/commons-lang.jar jp.jasminesoft.util.address.GenerateMasterData
    Generate Master Data Program. compaction=true
    Reading postal file...done.
    Creating zip file...done.
    
    Figure 9 Command execution
  10. Make sure that wagbyapp/webapps/wagby/WEB - INF/jmaster/zipcode.dat has been updated.
  11. Exit the command prompt.
  12. Restart the Wagby application.
If you do a build process after this, save the zipcode.dat created here again in the wagbyapp/webapps/wagby/WEB-INF/jmaster folder.

Please purchase Address Normalization Converter Server Module from Wagby Reseller.

I will explain here by taking the address normalization converter R6 as an example.

Apache Tomcat settings

Apache Tomcat's siteGet the latest Tomcat from.

I downloaded and expanded the apache-tomcat folder to "AnormR6Tomcat".

Setting up the webapps folder

Delete the files below the webapps folder attached as standard.

Figure 10 Delete the standard files below the webapps folder
Figure 11 Empty webapps folder

Deploy the obtained address normalization converter server module in the webapps folder.

Figure 12 Anorm expanded in the webapps folder

Indicates the webapps folder after expansion.

Figure 13 webapps folder after deployment

Edit web.xml

Edit anorm/WEB-INF/web.xml.(Notepad attached to Windows OS can not be used.Please use another text editor such as TeraPad.)

Edit "jmasterDirPath" appropriately.Please specify the path of jmaster which is the address master provided by the address canonicalization converter.(On Windows OS, enter two circle marks for the folder delimiter.)

Figure 14 Specifying jmaster's path

Edit catalina.bat

Edit the catalina.bat file included in the bin folder.

Figure 15 catalina.bat file

Specify the memory size at the end of the comment.

set JAVA_OPTS=-Xmx1024m -Xms1024m

Since the address normalization converter R6 requires 1 G byte of heap memory as a standard, this is specified.

Figure 16 Memory size setting

Edit server.xml

You can skip this step if address normalization converter server and Wagby's development machine are "different".

HereThe address normalization converter server and WagbyDesigner are running on the same machineWe will explain how to change the Tomcat port number of the address canonicalization converter server assuming the case.

If the port number is duplicated, server startup will fail.
Figure 17 Open server.xml

This is an example of changing the part of port number "8005" to "18005".

Figure 18 Change port 8005

This is an example of changing the part of port number "8443" to "18443".

Figure 19 Change port 8443

This is an example of changing the part of port number "8009" to "18009".

Figure 20 Change of port 8009

Activation of Address Normalization Converter Server (Tomcat)

Run startup.bat in the bin folder.

Figure 21 startup.bat file

Loading of address master starts after startup.The console has a display on the master loading.I got a message saying "Server startup in XXX ms" and it has been successfully launched.

Figure 22 Successful startup
Address normalization converters will not work properly if the address master starts without messages.Please review the setting of web.xml (the position of the address master folder).

Operation test

Open the address canonicalization converter server from the web browser.

http://localhost:8080/anorm/
Figure 23 Opening the Test Screen

Enter the address character string and press the "Start normalization processing" button.Please check whether normalization is done.

Fig. 24 Operation test (1)
Fig. 25 Operation test (2)

We will then test the REST API.Directly in the address bar, enter the following.(Input parameters are zip codes.)

http://localhost:8080/anorm/v1/anorm?zipcode=1030027

If the result is returned in JSON notation, the operation test is over.

Figure 26 Testing the REST API
When using Address Normalization Converter from Wagby, we use this REST API function.

Internal structure

When Wagby defines a file type item, two columns are prepared in the table.

  • In the first column, save the original file name.
  • In the other column, record the physical file name in the upload_dir folder.

The file body is not stored in the database.A folder of model ID is prepared in the folder called upload_dir, and temporary file name is added to it and it is saved.

Figure 27 upload_dir Folder

When you create a file type item, there are two items in the corresponding (database) table.Here is an example.

Suppose you prepare a file type field photo for model product.At this time, the table product is created, but two items are prepared as follows.

item name Description An example
photo The file name is stored. duke3D.jpg
photo_jshfilename Indicates the path where the file exists.The starting point is wagbyapp/bin. ../../upload_dir/product/__multi1869501174086226700.tmp
In this example, the actual file stored in upload_dir is temporary file name (extension tmp).You can also use the uploaded file name itself.It is explained in the next section.

Use original file name as it is

Figure 28 shows the upload_dir folder when "Use original file name as is" is set.It is stored as the file name at upload.

Figure 28 Contents of upload_dir folder when original file name is used as is

Notes on "Use original file name as is" setting

  • In the production environment (server), you need to use an OS that can handle Japanese names (eg Windows OS).
  • When using target items as search criteria, please distinguish between full-width and half-width characters and use them.Input filter is not applied.(Filter is internally forced to "character string (minimum)".)
  • When a file of the same name is registered when using the original file name, a suffix is ​​automatically assigned to distinguish file names as "_ 1", "_ 2", "_ 3", ....

When changing file name handling to "leave original file name" method during operation

If you change the settings so as to change the settings so that "use the original file name as the file name as it is" after operation, and rebuild the application, replacing the application will be as follows.

  • The file registered up to that point remains the file name with extension .tmp.
  • Files registered after application swapping are saved as original file names.

We provide a tool for restoring the name of the .tmp file registered in the past to the original file name. For details, please read "Change file name handling to method to leave original file name".

Handling of entities of files

When file deletion processing is carried out, the file name information is deleted from the database, but the entity of the file remains.

The reason for leaving the entity of the file in the upload_dir folder is as follows.

  • In the case of using the copy registration function, it is necessary to prevent that the entity of the file no longer exists from the data copied when the copy source data is deleted.
  • In the case of file type item lookup/self model saving, it is necessary to perform double management of files at interlocking source and interworking destination.Even if the linkage source is copied, the entity of the file to be referenced from the interworking destination needs to remain.

Periodically delete physical files

There is a job to periodically delete the (remaining) entity of the file. "Support> Administrator Guide (R8)> Delete unreferenced file deletion job" Please read.

Delete physical files at the same time

There is also a method of deleting the entity of the file at the timing of data deletion.Please do this only if it does not correspond to "the reason to leave the entity of the file in the upload_dir folder".

Prepare the myapplication.properties file in the customize folder customize/resources and add the following line.

server.context-parameters.file_delete_mode=UnsavedFile

After adding the above setting, please build.This setting applies to the entire application.

You can also modify the application.properteis file directly during operation.File deletion processing will work with the operation after changing (and restarting).However, the file before the change remains in the upload_dir folder.For historical data, search the file type items stored in the table directly with SQL and manually delete unreferenced files.

Restriction

It does not correspond to list update, upload update, bulk update, mail reception, file deletion in mail transmission.Also, when using Dao/Service with customization code, it is not supported yet.These are plans to cope with future Wagby.

Change destination folder

Open the automatically generated WEB-INF \ classes \ savedir.properties.UTF8 file with a text editor. It is described as follows.

# ライセンスファイル
savedir.jfclicenseholder=../../upload_dir/jfclicenseholder
# メールテンプレート
savedir.jfcmailtemplate=../../upload_dir/jfcmailtemplate
# 帳票テンプレート
savedir.jfcreporttemplate=../../upload_dir/jfcreporttemplate
# 顧客
savedir.customer=../../upload_dir/customer

By default, it is relative to the origin directory (wagbyapp \ bin).The save destination can be specified for each model.

Here, edit only the models that you want to change, leaving entries.For models that do not require change, delete the description from the original file. For example, if you only want to change the storage location for the "customer" model, it will be as follows.

# 顧客
savedir.customer=C://Users//YOURNAME//Desktop//newfolder

Save the edited file in the customize \ resources folder with the filename mysavedir.properties.UTF8.

Changes after starting operation

If you create the mysavedir.properties.UTF8 file during operation, the following rule will be taken.

  • For files registered before change, refer to the folder specified before change.
  • For files registered after change, refer to the newly specified folder.
For this reason, please be careful not to erase the folder specified before change.

Other information

"Support> Wagby Developer Network (R8)> Customizing with Java> Resource file".

Behavioral differences by database

The behavior when saving part of the items for which unique constraint settings have been made as unentered (null) depends on the database.

Define unique constraints for fields A, B, and C.Here, we will register the data A: aaa, B: null, C: ccc. After that, if you try to register data of A: aaa, B: null, C: ccc again, it becomes as follows.

Built-in database (HSQLDB), PostgreSQL
Can be registered.
SQLServer
Failure to register due to unique constraint violation.

For details, please read the manual of your database.

Generated DDL

The setting of the unique constraint specified here can be confirmed with the following file.

wagbydesigner/webapps/wagbydesigner/WEB-INF/env/work/dbschema/createddl/モデルID.ddl

You can check the contents of the file with a text editor.The following DDL is included.

alter table "モデルID"
   add constraint jfcuk_モデルID_設定した名前 unique ("項目名");

When you run init_db.bat, this alter statement is also executed at the same time.

Automatic adjustment of unique constraint name

The unique constraint name is adjusted according to the maximum length of the constraint name permitted by the database to be used.

Specifically, if the name exceeds the maximum length, it will be abbreviated.(As a result of abbreviation, in case of duplication, assign a unique name so as not to duplicate this.This also applies to table names and item names.)

By modifying project_filter.xls you can customize the standard filter rules.

Figure 29 project_filter.xls

download

Extract the downloaded file and save it in the customize/resources folder.Standard filter rules can be changed according to the specifications below.When you do a build, customized filter rules will be applied.

project_filter.xls Specification

  • You can not define new filters.You can change the application rules of existing filters (those included in "Filter Name").
  • Each number means the order of application.Changing this number will change the rule.
  • If you erase the value, the filter rule will no longer be used.At this time, arrange the order of the numbers in order.

Where the index file is stored

Search index files used for full-text search are stored in the following places.

wagbyapp\webapps\wagby\WEB-INF\idxdir\モデル名

When the index file is changed

The index file is changed at the following timing.

  • Change data (new registration, update, delete)
  • Import processing
  • Index optimization processing

Index size

When data is registered in the index, the size used for one data item is about 7.2 times the maximum size of the registration target. From this, the index size used in one model can be estimated as follows.

インデックスサイズ(バイト) = データ件数 × 平均登録対象サイズ × 7.2

Please give approximate numerical values ​​from the number of character strings stored in the item to be subjected to full text search and the number of text character strings included in the attached document for the average registration target size.

The size of the index file is larger than the size of the data to be handled. Especially when you enable full-text search function of attached file index size becomes huge. Make sure that enough disk space for indexes is secured as well as disk space for data pacing.

Index generation rule

An index file to be used for full-text search and an index file to be used in a suggestion are prepared separately.

Full text search

N-gram index method is adopted.The value of N uses 2 (bigram).
This is to register two characters at a time while shifting each character one by one from the beginning of the string as a search word.

For example, "Tokyo" in the case of the character string "Tokyo" "Kyoto" is the search term.The concrete search operation is as follows.

  • "East" will not hit.
  • It will hit in "Tokyo".
  • It does not hit in "Kyo".
  • "Kyoto" will hit.
  • It hits in "Tokyo".

For single-byte alphabet letters, however, it is necessary to register a division by a delimiter such as space.
For example, in the case of "orange pineapple banana", divide it into "orange", "pineapple", "banana" and register each as a search word.For this reason, if "apple" is entered as a search word, it will not hit, but "pine" will hit.

Suggest

Register the character string as it is without dividing it as it is. If the character string exceeds 64 characters, register 64 characters from the beginning.

For Suggest, it will be a match search from the beginning.For example, "North" hits against the string "Kitakyushu", but "Kyushu" does not hit.

Index optimization processing

The index file can be kept constant by performing the optimization processing on a regular basis. Wagby performs optimization processing at the following timing.

To run the application without stopping, set the index optimization job.

Recreate the index file manually

If the index file is corrupted for some reason, you can recreate it with the following procedure.

Since the index file is a file for searching, data will not be corrupted even if it is damaged.
  1. Stop the web application.
  2. Delete the index file.

    When optimizing the index of a specific model, for example, to optimize the index of the sample model, delete the following folder.

    wagbyapp\webapps\wagby\WEB-INF\idxdir\sample

    Also, when optimizing the entire index, delete the entire following folder.

    wagbyapp\webapps\wagby\WEB-INF\idxdir
  3. Launch the web application.The index is optimized after index creation during initialization processing.

Specify URL

You can open the screen on Wagby directly from the external system.Include the following information in the URL:

Key Description
user Logon Account
pass password
forwardUrl Information on the destination screen

For example, when opening the list screen of the customer model (customer), it becomes as follows.Please properly read the host name.

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=showListCustomer

Although logon processing is performed, when logging on, when skipping the menu screen and opening the list screen of the customer model (customer), it becomes as follows.

http://localhost:8921/wagby/logon.do?forwardUrl=showListCustomer
  • Please write "screen name" for parameter forwardUrl.Here, the screen name is equivalent to the part displayed in the URL when selecting the menu after logon.
  • If you do not specify additional parameters for the destination screen, the trailing ".do" is not required.
  • If you omit the forwardUrl parameter, the main menu screen is displayed.
  • If logon account or password is omitted, the login screen will be displayed.After logging on, the screen will move to the screen specified by forwardUrl.
  • Even if the logon account or password is incorrect, it will also transition to the logon screen.At the same time, "The user name or password is incorrect" on the screen.Accounts may be locked if you mistake the password multiple times consecutively.Please be careful."Error message will be displayed.
This method includes a password in the parameter.Please consider using security risks thoroughly in operation.

Example: Open new registration screen

Add the action_New parameter to the URL.The value part is also "New".

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=insertCustomer.do?action_New=New

The character string following the prefix "action_" is treated as "event". For details, please read "Screen transition parameter summary".

Example: Granting search conditions

Replace "&" included in the forwardUrl parameter with "% 26".This is to make it possible to treat strings after the forwardUrl parameter as a batch.

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=showListCustomer.do?action_Search_Condition=Search_Condition%26customer_cp$002f整数型項目1jshparam=整数値%26customer_cp$002f整数型項目2jshparam=整数値
  • In the above example, the model name that stores the search condition is expressed as customer_cp.For details, please read "Condition Model".
  • Please read "integer type item" in the above example properly.Wagby allows you to specify a range for integer type items.Distinguish between start and end by giving the suffix "1jshparam" and "2jshparam" respectively.
  • Separate the condition model name with the item name with "$ 002f".It is an expression that encodes the '/' character with utf - 8.

Example: Giving a search condition including Japanese characters

Let the transition destination be showListStaff.do.Also, make the search condition part as follows.

?action_Search_Condition=Search_Condition&staff_cp$002fname=鈴木 一郎

First, URL encode only the multibyte character string "Ichiro Suzuki" of the parameter.The character encoding should be utf-8.

?action_Search_Condition=Search_Condition&staff_cp$002fname=%E9%88%B4%E6%9C%A8%20%E4%B8%80%E9%83%8E

Next, concatenate "screen URL" and "parameter".

showListStaffSub.do?action_Search_Condition=Search_Condition&staff_cp$002fname=%E9%88%B4%E6%9C%A8%20%E4%B8%80%E9%83%8E

This stringagainURL encoding.

showListStaffSub.do%3Faction_Search_Condition%3DSearch_Condition%26amp%3Bstaff_cp%24002fname%3D%25E9%2588%25B4%25E6%259C%25A8%2520%25E4%25B8%2580%25E9%2583%258E

Specify the character string created in this way as the parameter value of forwardURL in logon.do.

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=showListStaffSub.do%3Faction_Search_Condition%3DSearch_Condition%26amp%3Bstaff_cp%24002fname%3D%25E9%2588%25B4%25E6%259C%25A8%2520%25E4%25B8%2580%25E9%2583%258E
"=", "$", "?", "." Among parameter values ​​specified for forwardUrl will work without URL encoding.That is, characters that require URL encoding are "&", "%", and multibyte characters.

To summarize, replace Japanese characters (multibyte characters) with the URL-encoded value twice.

Operation from smartphone

In case of URL including logon account and password

You can open any screen.

http://localhost:8921/wagby/mobileSafariLogon.do?user=admin&pass=admin&forwardUrl=showListScheduleMobile

When not including logon account and password

On the PC, if you omit the logon account and password, you will be redirected to the designation screen after logon authentication.For smartphones, forwardUrl specification is invalid.In other words, after logon authentication, the menu screen is displayed without being redirected to the specified screen.

The menu screen is the same as the menu displayed after logging on with the logon account.If you log on with admin, the admin menu will be displayed.

Application example Switch to maintenance mode

In the following example, log on from the outside as a system administrator and enable maintenance mode.

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=maintenanceApp.do?__jfc_app_mode=Maintenance

To cancel maintenance mode, specify Normal for parameter __jfc_app_mode.

http://localhost:8921/wagby/logon.do?user=admin&pass=admin&forwardUrl=maintenanceApp.do?__jfc_app_mode=Normal