JAVA tools
JAVA tools
General remarks
Click: The parts that require you to click with the mouse will be displayed in bold.
Variables: When mentioning dynamic or non-fixed text items, [] will be used as a prompt, such as [User Name]
Component: Every object in process design is commonly called a component.
Field: generally refers to the interface that can be input. In this system, it also specifically refers to the input field in the form design.
Tabs: paging options on the interface or window
Block: refers to a collection of multiple fields, usually with a name at the top
Order number: also called data_no, an order will only have one order number.
Data number: also known as id / data_id. An order will have multiple ids. A new id will be generated every time an order is pushed.
Preface
This article mainly introduces how the JAVA Base system uses the omflow.jar package to create and access process data.
1 Login related
Class: com.syscomgo.omflow.java.Login
1.1 Obtain Token
Method: doLogin
The input parameters are as follows:
URL: URL of the object OMFLOW Server, for example: https://omflow.com.tw
user: User account with process permissions
password: the user’s password
The data type returned is JSON Object and the format is as follows:
1.2 Maintain Token
Method: keepToken
OMFLOW's API requires a token to confirm who is sending the request, and this token is time-sensitive. After the last request (including any request), if there is no request again for more than 5 minutes, the token will become invalid. Need Re-obtain Token. The purpose of this method is to maintain the validity of the Token with minimal resource consumption.
The input parameters are as follows:
URL: URL of the object OMFLOW Server, for example: https://omflow.com.tw
token: Token obtained by doLogin
The data type returned is String (success or error message)
2 Information related
Class: com.syscomgo.omflow.java.Data
2.1 Open an order
Method: putData
The user fills in the form content and then sends it, allowing the data to be advanced according to the designed process until it encounters "manual processing" and then stops and waits for the next user to manually advance, or until it encounters "end" and closes the order.
The input parameters are as follows:
URL: URL of the object OMFLOW Server, for example: https://omflow.com.tw
api_path: Specify the API path of the process
token: Token obtained by doLogin
obj.Form: Form object, see Chapter [3.4] for details
The data type returned is String, "order number" or error message
2.2 Push orders
Method: modData
After the user confirms the current form content and fills in the necessary information, the form execution process is pushed again.
The input parameters are as follows:
URL: URL of the object OMFLOW Server, for example: https://omflow.com.tw
api_path: Specify the API path of the process
data_id: Data number. Since the OMFLOW process has a "parallel" function, it may not be possible to accurately advance the form only by relying on the "single number"; in the data returned in the list, the value with the key id is data_id
token: Token obtained by doLogin
obj.Form: Form object, see Chapter [3.4] for details
The data type returned is String, "order number" or error message
2.3 Get information (list)
Method: getList
This method allows the user to obtain all the data that the process has currently opened.
The input parameters are as follows:
URL: URL of the object OMFLOW Server, for example: https://omflow.com.tw
token: Token obtained by doLogin
obj.query: Query object, see Chapter [3.1] for details
The data type returned is JSONArray and the format is as follows:
2.4 Obtain historical data of a specific order number
Method: loadHistory
From the time a form is created, every time it goes through "manual processing" and is pushed by the user, a "process" will be generated to record the content filled in by the user for future audits and other situations. This method allows users to obtain all "processes" for a specific order number in a specific process.
The input parameters are as follows:
URL: URL of the object OMFLOW Server, for example: https://omflow.com.tw
token: Token obtained by doLogin
api_path: Specify the API path of the process
data_no: The order number to be queried
The data type returned is JSONArray and the format is as follows:
2.5 Delete order
Method: delData
This method allows users to delete an already created order, including the order's "history", attached files, etc.
The input parameters are as follows:
URL: URL of the object OMFLOW Server, for example: https://omflow.com.tw
api_path: Specify the API path of the process
token: Token obtained by doLogin
data_no: The input data type is ArrayList, and the order number to be deleted is placed in the List.
The data type returned is boolean
3 Appendix
Sections 1 and 2 describe the services that omflow.jar can provide, and this section will supplement some of the object formats required in the first two sections.
3.1 Query
Class: com.syscomgo.omflow.java.obj.Query
properties | method | input type | note |
---|---|---|---|
api_path | setAPI | String | |
searchkey | setSearchkey | String | Perform fuzzy search for search_columns |
search_columns | putColumn | com.syscomgo.omflow.java.obj.Column | |
search_conditions | putCondition | com.syscomgo.omflow.java.obj.Condition | |
order_columns | putOrderColumn | com.syscomgo.omflow.java.obj.Column | |
index | setIndex | Int | From which data to start |
limit | setLimit | Int | fetch several pieces of data at a time |
clear | |||
toJSON |
※ Only one of searchkey and search_conditions will take effect (search_conditions takes precedence)
OMFLOW version 1.1.6.3 features:
3.2 Condition
Class: com.syscomgo.omflow.java.obj.Condition
properties | method | input type | note |
---|---|---|---|
name | setColumnName | String | |
oper | setOper | String | !=,=,>,<,in,contains |
value | setValue | String | |
setValue | ArrayList | ||
setValue | boolean | ||
super | setSuper | boolean | |
toJSON |
3.3 Column
Class: com.syscomgo.omflow.java.obj.Column
properties | method | input type | note |
---|---|---|---|
name | setColumnName | String | |
is_query | getIsQuery | boolean | setStringValue returns False, setQueryValue returns True |
value_string | setStringValue(String) | String | |
value_query | setQueryValue(query) | com.syscomgo.omflow.java.obj.query | |
is_text | setTextMode | boolean | default = true |
3.4 Form
Class: com.syscomgo.omflow.java.obj.Form
| properties | method | input type | note | | ---------- | ----------- | -------------------- | ----- --------------- | | formdata | setForm | String, JSONObject | field name, field value | | | setForm | String, ArrayList | field name, field value | | | setForm | String, String | field name, field value | | | setForm | String, int | field name, field value | | | getFormData | | ArrayList |
Last updated