summary
This article is intended for users who will perform customization using Unifinity Studio on applications generated by Unifinity Wizard (hereinafter referred to as "Wizard").
When an application is generated by Wizard, a file with a ".ufpz" extension is also generated. This file contains the complete set of Unifinity Application project files in Zip format. This article provides an overview of this project file in its entirety.
Table of Contents
3.1. Processing to be generated
3.3. Design concept of processing
1. Screen Design
1.1. Screen
1.1.1. About the generated screen
The application generated by the Wizard (hereinafter referred to as "generated application") will generate the following 6 types of screens depending on the settings made in the Wizard.
frame page
One is always generated regardless of the Wizard setting. This screen is always displayed while the application is running. Screen transitions are performed by switching the screen displayed in the sub form.
For more information, see "1.2.1. About Framed Pages and Screen TransitionsPlease refer to the "See
overview screen
A list screen is generated for the number of screens set in the Wizard's list screen. If multiple list screens are set up, you can switch between them in the footer menu.
detail screen
A screen with the pattern set in the Wizard's detail screen will be generated. Displays basic data and transitions to the basic data and field data entry screens.
input screen
An input screen for basic data and an input screen for the number of processes set in the Wizard work process are generated. Transition to the corresponding confirmation screen is performed.
confirmation screen
A confirmation screen is generated for the basic data and for the number of processes set in the Wizard work process. When the input is confirmed, it is recorded in the internal DB and the transition is made to the detail screen.
common component
Regardless of the Wizard settings, all common components such as menus and numeric keys are generated. It is loaded into the "pop-up sub form" of the "frame page" and used.
For more information, see "1.2.1. About Framed Pages and Screen TransitionsPlease refer to the "See
1.2. Screen Transition
1.2.1. Frame Pages and Screen Transitions
The "Page Subform" and "Popup Subform" are placed on the "0000_Frame Page" (hereinafter referred to as "Frame Page").
Screen transitions are performed by switching the screen displayed on the "Page Sub Form".
As for screen transitions, see "Page open process (prefix "0")See also.
The "pop-up subform" is hidden. Common components such as numeric keys are read and displayed according to user input.
The configuration image is shown in the figure below.
2.About DB design
2.1. Generated Tables
2.1.1. Table types
The following three types of data tables and temporary tables are generated in the "Generation Application" according to the settings in the Wizard.
basic data
Fields for the items set in "Basic Information" in the Wizard will be generated.
on-the-spot data
Fields for items not set in "Basic Information" in the Wizard will be generated. If processes are set, a table is generated for each of the number of processes.
repetitive data
Fields for items set to "Repeat Data" in the Wizard will be generated. If processes are set, a table is generated for each process.
temporary
This table is used temporarily in each process of the generated application.
For more information, see "2.3. About temporary tablesPlease refer to the "See
2.1.2. About common fields
The following fields are commonly generated in the generated data tables.
_id
A unique ID within the application.
When data is newly created in the application, a temporary ID starting with "x" is set using the date and a random number.
When data is sent to the cloud, a unique ID is issued by the cloud server and replaces the temporary ID. IDs issued by the server are unique throughout the cloud.
_pid
Parent ID.
Empty for basic data.
For field data, record the _id of the basic data.
For repeating tables, record the _id of the field data.
condition
Indicates the status of the data.
Used for markup in listings on the listing screen.
- new" new data. Marked up in light blue.
- UPDATE" updated data. Marked up in yellow.
operation
Represents a method of transmitting data in the cloud.
- New data generated by the "post" application.
- Data updated by the "put" application.
version
By recording dates, sequential numbers, etc., it is possible to detect conflicts between data in the cloud and data in the application.
table
Indicates data affiliation. Automatically assigned when data is sent to the cloud.
- Prior" Basic Data
- onsiteNField data (N(Process No.)
- repititionNRepeated data (N(Process No.)
One table is assigned to the cloud for each generated application. This field is used to sort out which table in the cloud the data corresponds to in the app.
2.1.3. Additional fields
The following additional fields are generated in the generated data table.
each item
Each field configured with a Wizard item name will be generated. The physical name is pXXXThe first two are the following. (in Japanese history)XXX(* is a sequential number)
Full field
This will be generated in addition to the items for which "Camera" and "Handwriting" are set in the Wizard input method. The physical name is pXXX_Full. (in Japanese history)XXX(* is a sequential number)
The Full field records the large size data of the image, while the non-Full field records the thumbnail data of the image.
Process, process number
Generated only for basic data. If there are processes, record which process has progressed to which point.
2.2. Role of Tables
2.2.1. The role of tables
The generated data tables are further divided into the following three types of tables for each role
Transaction table (prefix "T")
This table is used for screen displays such as list screens. Data is washed out during data synchronization.
Work Table (prefix "W")
This table is used for data editing on the input screen.
When editing data, copy data from the transaction table to the work table.
When editing is complete, the contents are reflected in the transaction and local tables.
If the edit is canceled, nothing is done.
Local table (prefix "L")
Stores data that has been edited in the app but has not yet been synced to the cloud.
Once the data is sent to the cloud, delete the record.
The relationship between each table, role and screen is shown in the figure below.
2.3. About temporary tables
The temporary tables generated and their main uses are as follows
2.3.1 X_Master Selection
It is used in the "Master Selection" section of the input screen.
The "9.30.2. List" screen is designated as a sub form in the "9.30.1. Master Selection" screen. The "9.30.2. List" screen is linked to the "X_Master Selection" table.
The "0_9300_Master_Select (Screen Name, Control Name, Display Name, Initial Value)" process is invoked when an item marked "Master Selection" is selected on the input screen. Extract the choices to be displayed in the master selection in the process and add a record to the "X_Master Selection" table. As a result, a list of choices is displayed in the "9.30.1. Master Selection" screen.
2.3.2 X_Process
This is used for pages and processes that use "process".
The "process name" entered in the Wizard is set as the initial value.
The sub forms in the "Process Details" screen are linked to the "X_Process" table.
In the process page open process, the process number of the basic data displayed on the screen is obtained and the "process status" of the "X_Process" table is updated. As a result, the contents of each process and the process buttons on the "Process Details" screen are enabled/disabled.
2.3.3 X_Process Filter
Used in "Filter" type listings.
The "9.31.2. Process List" screen is specified as a sub form in the "9.31.1. Process Filter" screen. The "9.31.2. Process List" screen is linked to the "X_Process Filter" table.
The "0_9310_Process filter startup (screen name, control name, display name, initial value)" process is called when the "Filter button" is clicked in the "Filter" type list screen. In the process, process information is obtained from the "X_Process" table and records are added to the "X_Process Filter" table. As a result, process options are displayed in the "9.31.1. Process filter" screen.
2.3.4 Communication Result Temporary
It is used in the data transmission communication process. ."Subroutine for communication (prefixes "9_021x", "9_022x", "9_023x", "9_024x")See also.
For each data record communication, the _id of the corresponding data and the communication result (ok/ng) are stored. After the communication process is completed, each data record is updated based on the communication results, and error messages are displayed on the screen.
3. Treatment design
3.1. Processing to be generated
The following processes are generated in the "Generation Application".
3.1.1. Processes used on the page
This is the process used on each screen. The two main types are as follows
Page open process (prefix "0_[screen number]")
This process is used to display the corresponding page. Call this process when performing screen transitions within the application.
As for screen transitions, see "1.2.1. About Framed Pages and Screen TransitionsSee also.
Processing corresponding to each UI (prefix "9_[screen number]")
This process corresponds to UI such as buttons in the corresponding page.
3.1.2. Processing for common parts
This is the process used on each screen. The two main types are as follows
Part open process (prefix "0_9xxx")
This process is used to display the corresponding page. Call this process if you want to display a popup in your application. Specify the name of the screen from which to call, the name of the control to which the input is reflected, etc., as parameters. If no screen name is specified, the process will close the popup.
As for screen transitions, see "1.2.1. About Framed Pages and Screen TransitionsSee also.
Processing for each UI (prefix "9_9xxx")
This process corresponds to UI such as buttons in the corresponding page.
3.1.3. Utility Processing (prefix "9_00xx")
Subroutines called from each process in the application.
3.1.4. Processing for communication
This process is used when synchronizing with the cloud. The three main types are as follows
Communication utilities (prefixes "9_01xx", "9_020x")
Subroutine called from the communication process.
In addition, if you want to change the destination of the cloud DB connection, you can use the "For UniBaaS DB subscribers] Changing the UniBaaS DB connection destinationPlease refer to the "See
Processing for communication (prefixes "9_0210", "9_0220", "9_0230", "9_0240")
This process is a collection of subroutine calls for communication. This process is called when communicating with the cloud.
Subroutine for communication (prefixes "9_021x", "9_022x", "9_023x", "9_024x")
This is the communication process corresponding to each data table.
3.1.5.Communication During kintone Integration
When integrated with kintone, the sending process utilizes bulkRequest (a kintone API feature that processes multiple app record operations in bulk). First, add the data to be sent using the "+9_0300_[kintone]bulkRequest Queue Addition" logic. Then, by calling "+0_0300_[kintone]bulkRequest Data Transmission," the data added to the queue will be sent in batches of 20 via bulkRequest.
3.2. Process name
3.2.1. Processing Name Prefixes
Process names prefixed with "*" or "+" are those where the Wizard dynamically sets the content.
When customizing a generated application, it can be used to determine which processes are common and which have been changed dynamically.
3.3. Design concept of processing
In principle, each screen is processed only for its own screen (and subforms).
To increase the independence of each screen, if you want to carry over or influence the results to another screen, use the argument parameter of the page open process to which you are transitioning, use a global variable, or use a related data table. Basically, "control/content set" etc. is not used for another screen.
4. About Global Variables
4.1. Global Variables
4.1.1. Global variables to be generated
The following six types of global variables are generated in the "Generated Application" according to the settings in the Wizard.
Each name
Set each name to be used within the generated application.
- Primary Key Name" Records the name of the field that will be the primary key of the data table.
- Record the name of the field that contains the parent ID of the "Parent Key Name" data table.
- Record the name of the application. Used internally to obtain connection information to the cloud.
field list
For each of basic data, field data, and repetitive data, set the corresponding field names separated by commas. This is used to determine which fields to retrieve from the cloud during data synchronization.
binary field
Set the field names that contain the binary data, separated by commas. Used to determine the following processes when synchronizing data with the cloud
- Base64 decoding is performed to display images on the "When data is received" list screen, etc.
- Base64 encoding is performed because binary data cannot be stored in the cloud as-is "when sending data".
Date Field
Set the field names that contain date fields, separated by commas. Used to determine the following processes when synchronizing data with the cloud
- Convert date string to Unixtime so that Unifinity can handle date types "when data is received".
- Data Transmission" *Additional processing is not required because Unixtime can be automatically converted to characters during transmission.
list screen key record
Set the key items set in the Wizard's list screen.
The search results are referenced from the list screen process to determine which fields to search when performing a search on the list screen, etc.
sample data insertion flag
Record the check ON/OFF attached to "Add sample data" when the application is generated by Wizard.
If ON (global variable is "1"), sample data is added to each data table when the application is launched.