Queries are essential to how ADC functions. With just a few queries, a
lot of the SQL tasks are minimized as the rules processing handles complex conditions
and actions.
Running the sample's adc script
created five tables that will be referenced by the query service. ADC_READ and ADC_WRITE
access their DEF table to do the steps requested by
your Ruleflow Service Call-outs.
No matter how many ADC connections you make for the Vocabulary in your
project, you need to define one and only one Query Datasource that will be used by all
services and batch processes in the project's Decision Services. To connect a Vocabulary to a defined database where you will read
the SQL queries, define the connection as a Query Datasource. In the project's Vocabulary
editor, select the Vocabulary command Add Datasource > Add Query
Datasource, as shown:
The Query tab is added to the root level
of the Vocabulary as a fixed-name tab, as illustrated:
where:
Description: An informative
description of the Query Datasource.
Database Server: The
database product. Click the dropdown menu on the right side of the entry area to list
the available database brands. Corticon embeds Progress DataDirect JDBC Drivers for each database. These drivers provide
robust, configurable, high-availability functionality to RDBMS brands.
The drivers are pre-configured and do not require performance tuning.
Database URL: The preconfigured URL for the
selected database server. You must edit the default entry to replace (1) <server> with the machine's DNS-resolvable hostname
or IP address and port , and (2) <database
name> with the database name that was set up (typically
case-sensitive).
Authentication: The
authentication technique required for the Datasource. Most drivers default to Basic where the Username and Password fields are available, and offer Keberos as the alternative. Some drivers have other
options. See Authentication on EDC and ADC connections for
more information.
Catalog Filter and Schema
Filter: Patterns that refine the metadata that will be imported.
Click the CONNECTION Test
button. Confirm that you have a valid connection before proceeding.
Import the queries
To access the queries for use in Service Callouts in Ruleflows, click
the QUERIES Import button:
The current query names in the Query Datasource are accessed and
brought into the local persistent cache. Whenever query names are revised, you need to
re-import the queries. If the query defs referenced by a query name change, the latest
defs will be accessed by the query name.