Database Node
The key database node function is to configure the adapter layer of a database adapter that would like to integrate with any system on service flow and then define database commands to work with the database.
Requirements for Database Node
Data Source Name
Database that will be used on service workflow must be connected through SSQUARE Admin. See more on Database Adapter
SQL Type
As the database has four types of work function, select one of the following :
- SELECT is used to fetch data from a database table
- INSERT is used to add new data to a database table
- UPDATE is used to edit and update data of an existing record
- DELETE is used to delete data from a database table
Download Template
This function will show you how to create the field on DATABASE NODE, after downloading you will receive the excel field that explain about Input and Output
Field.
Import Fields
In case you already have the excel file, you can bring the existing excel import to the Input Field instead of adding a field by yourself.
Export Fields
If you would like to export the fields on the database node, you able to export the fields that are already added in the node by click at Export Fields.
SQL Statement
To complete the database commands easier, preparing SQL statement before configure with the database node is preferred.
Example: Select code,size,color,gender,breed
From database_test.cats_criteria
Where code = #code#
Database Properties
To configure Database Node Properties :
- Double click at Database Node to open Database Properties popup
- Select your Data Source Name that will use on service workflow
- Choose SQL Type that match with your work function
- Define statement to manage the selected database in SQL statement field :
# is used as SQL injection for input data
Example: Select code, size, color, gender, breed
From database_test.cats_criteria
Where code = #code#
Input name in SQL Statement must match with a defined input field in INPUT section (Case sensitive).
CAUTION : For SELECT statement, if you query huge transaction, will impact to SSQUARE Server performance and stability.
- In INPUT section, create your input fields:
- Click + to create a new input. Configuration differs based on type of data:
Data Type: List | Data Type: Field | ||
Collection | Yes | Collection | No |
Service Field | To select the input field from existing input in service flow. (** In case do not have Service Field, use Defined Field) | Service Field | To select the input field from existing input in service flow. |
Defined Field | To define a new input field in List Name | Defined Field | To define a new input field. |
Sub Fields | Add data and define type and format | Sub Fields | – |
- Select data type and format
- Data Type: To select input type such as String, Boolean, Date, Timestamp.
- Format: To select input format that will be placed on SQL statement
- Click at Create after adding all data
- Output Fields: create your output fields:
- Click + to create a new output. Configuration differs based on type of data:
Data Type: List | Data Type: Field | ||
Collection | Yes | Collection | No |
Column Name(DB) | To specify field name on | Column Name(DB) | To specify field name on |
Map to Service Field | To select the input field from existing input in service flow. | Map to Service Field | To select the input field from existing input in service flow. |
Map to Defined Field | To define a new input field in List Name | Map to Defined Field | To define a new input field in List Name |
Promote to Front End | To select whether the output will be returned when service is called or not | Promote to Front End | To select whether the output will be returned when service is called or not |
Sub Fields | Add Column Name and Map to Field | Sub Fields | – |
- Click at Create to add that data
** if you would like to delete field, select field that will delete and click at – to delete it
- Click DONE to save configuration
Note that column name is varied on database type
- PostgreSQL and AS/400, column name will be Lower Case.
- DB2 and Oracle, column name will be Upper Case.