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 :

  1. Double click at Database Node to open Database Properties popup
  1. Select your Data Source Name that will use on service workflow
  2. Choose SQL Type that match with your work function
  3. 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. 

  1. In INPUT section, create your input fields:
    • Click + to create a new input. Configuration differs based on type of data:
Data Type: ListData Type: Field
CollectionYesCollectionNo
Service FieldTo select the input field from existing input in service flow. (** In case do not have Service Field, use Defined Field)Service FieldTo select the input field from existing input in service flow.
Defined FieldTo define a new input field in List NameDefined FieldTo define a new input field.
Sub FieldsAdd data and define type and formatSub Fields
  • Select data type and format
    1. Data Type: To select input type such as String, Boolean, Date, Timestamp.
    2. Format: To select input format that will be placed on SQL statement
  • Click at Create after adding all data
  1. Output Fields: create your output fields:
    • Click + to create a new output. Configuration differs based on type of data:
Data Type: ListData Type: Field
CollectionYesCollectionNo
Column Name(DB)To specify field name onColumn Name(DB)To specify field name on
Map to Service FieldTo select the input field from existing input in service flow. Map to Service FieldTo select the input field from existing input in service flow. 
Map to Defined FieldTo define a new input field in List NameMap to Defined FieldTo define a new input field in List Name
Promote to Front EndTo select whether the output will be returned when service is called or notPromote to Front EndTo select whether the output will be returned when service is called or not
Sub FieldsAdd Column Name and Map to FieldSub 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
  1. 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.