Match Backend Extension
The purpose of the backend extension is to retrieve from and store data in a database. Using the keywords the user can save some consultation results or he can retrieve data from the DB and show it to the user during the consultation.
Enable / Disable Match Backend Extension
To enable or disable the Match Backend Extension for a KBA, perform the following actions:
- In the Overview page, click the button of the KBA you want to edit.
- Expand the Extensions Configuration panel and then expand the Forward Extension panel.
- Check the disable extension option.
- Click on Submit to save the changes.
You now have disabled the Match Backend Extension. To enable the extension, uncheck the disable extension option.
How to use the backend extension - Assisted Mode
Keyword |
TABLE TO RETRIEVE CONTENT FROM |
Meaning |
When TYPE OF DATABASE ACTION is set to RETRIEVE TABLE CONTENT, use this variable to select the table where to retrieve contents from. |
Remarks |
|
Keyword |
COLUMN IN TABLE TO RETRIEVE CONTENT FROM |
Meaning |
When retrieving contents from a table, set this variable to the column name where to retrieve the contents from. |
Remarks |
|
Keyword |
COLUMN-NAME TO FILTER TABLE ROWS ON |
Meaning |
The column name to filter on. Used for either retrieving specific rows, updating specific rows or deleting specific rows. |
Remarks |
○ COLUMN-NAME TO FILTER TABLE ROWS ON ○ COLUMN-OPERATOR TO FILTER TABLE ROWS ON ○ COLUMN-VALUE TO FILTER TABLE ROWS ON |
Keyword |
COLUMN-OPERATOR TO FILTER TABLE ROWS ON |
Meaning |
The operator for column filtering. Used for either retrieving specific rows, updating specific rows or deleting specific rows. |
Possible values |
<, <=, =, >, >=, IN |
Remarks |
○ COLUMN-NAME TO FILTER TABLE ROWS ON ○ COLUMN-OPERATOR TO FILTER TABLE ROWS ON ○ COLUMN-VALUE TO FILTER TABLE ROWS ON |
Keyword |
COLUMN-VALUE TO FILTER TABLE ROWS ON |
Meaning |
Set this variable with a value or a value reference to filter on. Used for either retrieving specific rows, updating specific rows or deleting specific rows. |
Remarks |
○ COLUMN-NAME TO FILTER TABLE ROWS ON ○ COLUMN-OPERATOR TO FILTER TABLE ROWS ON ○ COLUMN-VALUE TO FILTER TABLE ROWS ON |
Keyword |
TABLE TO CHANGE CONTENT OF |
Meaning |
When TYPE OF DATABASE ACTION is set to UPDATE TABLE CONTENT or DELETE TABLE CONTENT, use this variable to select the table for which to update the content. |
Remarks |
○ TABLE TO CHANGE CONTENT OF ○ COLUMN-NAME TO CHANGE CONTENT OF ○ COLUMN-VALUE TO CHANGE CONTENT WITH
|
Keyword |
COLUMN-NAME TO CHANGE CONTENT OF |
Meaning |
When changing contents from a table, set this variable to the column name where to retrieve the contents from. |
Remarks |
○ TABLE TO CHANGE CONTENT OF ○ COLUMN-NAME TO CHANGE CONTENT OF ○ COLUMN-VALUE TO CHANGE CONTENT WITH |
Keyword |
COLUMN-VALUE TO CHANGE CONTENT WITH |
Meaning |
Set this variable with a value or a value reference to change the content of. |
Remarks |
○ TABLE TO CHANGE CONTENT OF ○ COLUMN-NAME TO CHANGE CONTENT OF ○ COLUMN-VALUE TO CHANGE CONTENT WITH |
Example:
How to use the backend extension - Manual Mode
The first thing using the manual Mode is to initiate a database action indicating the type of action that will be performed (insert, select, delete or update). For doing so, we need the keywords:
Keyword |
NEW DATABASE ACTION |
Meaning |
Clears old values from variables related to the Backend Extension as well as for User select-mechanism To do: create separate NEW USER SELECT to only clear User select-variables |
Possible values |
X |
Remarks |
|
Keyword |
DATABASE CONNECTION NAME TO USE |
Meaning |
Set this variable to the name of the database connection to use. (See database connections) |
Remarks |
|
Keyword |
TYPE OF DATABASE ACTION |
Meaning |
Determines the type of action to perform on the database. |
Possible values |
|
Remarks |
○ RETRIEVE TABLE CONTENT for SELECT ○ ADD NEW TABLE CONTENT for INSERT ○ UPDATE TABLE CONTENT for UPDATE ○ DELETE TABLE CONTENT for DELETE |
Example:
Once we have specified the database action, the SQL query needs to be specified:
Keyword |
FULL SQL-QUERY |
Meaning |
Use this to write a customized query using SQL. |
Remarks |
○ SELECT ○ INSERT ○ UPDATE ○ DELETE |
Example:
To trigger the connection with the database and perform the query, the following keywords are needed:
Keyword |
EXECUTE DATABASE ACTION |
Meaning |
Validates the query, connects to the database and executes the action on the database. |
Possible values |
|
Remarks |
|
The following keywords describe how to process the result.
Keyword |
DATABASE ACTION ROWS INVOLVED |
Meaning |
When a database action is completed successfully, this variable will contain the number of rows that were involved. |
Remarks |
|
Keyword |
DATABASE RESULTSET NEXT ROW |
Meaning |
Set this variable to X to move to the next row in the result set. |
Possible values |
X |
Keyword |
DATABASE RESULTSET |
Meaning |
Contains the resultset in a HTML grid, allowing for easy debugging by DISPLAYing it. |
Keyword |
DATABASE ACTION SUMMARY |
Meaning |
This variable has a value when an error occurred in the Backend Extension, assisting in debugging your model. |
Keyword |
SET MATCH VALUE |
Meaning |
Use this to set the value of a variable with the result of a database action. |
Remarks |
|
For handling the errors during the execution:
Keyword |
DATABASE ACTION ERROR TYPE |
Meaning |
Used to identify the type of error. |
Possible values |
|
Example:
Extra keywords for processing the results:
Keyword |
COLUMN-NAME TO RETURN VALUE FOR ADDED ROW |
Meaning |
This keyword allows you to configure one or more columns for which the value should be returned once it’s inserted. This does not make any sense for data that is inserted through the knowledge, because you already know what the new data is. This can be very useful though for retrieving the (auto increment) ID of a newly inserted row. |
Remarks |
|
Keyword |
COLUMN-VALUE RETURNED FOR ADDED ROW |
Meaning |
This variable will contain the ID of a newly inserted row. |
Remarks |
|
Example
Debug Api
The extension supports
action | param | meaning |
---|---|---|
MatchBackendExtension-enableLogging | true / false | the extension will create a debug-download with the original query, the query parsed and prepared for execution, and the parameter list |