skip to main content
Corticon Server: Data Integration Guide : Getting Started with Multiple Database Connectivity : Use multiple database connections in service callouts
 

Try Corticon Now

Use multiple database connections in service callouts

Note: Using the sample: The Ruleflow objects and their runtime properties are already defined in the sample.
To use multiple ADC connections in service callouts:
1. In a Ruleflow where you want to use multiple ADC connections, create Service Call-out objects on the Ruleflow canvas. In this example, the Ruleflow is defined with the project's Rulesheet plus a Service Call-out to read and another one to write back to the database table after rule processing, as shown:
This sample points out that you can have two ADC connections that have read and write actions.
2. Click on the Get Patient Data object, and then, on the object's Properties tab.
3. On its Service Call-out tab, click the Service Name pulldown to select the service you want for this use, as shown here where the sample uses CorticonADC.read for this service, as illustrated:
4. On its Runtime Properties tab. Use the Property pulldown to:
a. Select Datasource Name, and then, for its value, use the dropdown menu to select the Datasource that corresponds to the name of the datasource to which you want to apply a query. For the ADC sample, choose Patient Data.
b. Select Query Name, and then, for its value, use the dropdown menu to select the appropriate query. For the ADC sample, choose AllPatients. The listed values are initially imported from the Query Datasource, and are updated by the QUERIES: Import function on the Query tab.

Defining a Service Call-out to another database

Another Service Call-out object on the canvas can access another database:
1. Click on the Get CMS Details object, and then, on the object's Properties tab.
2. On its Service Call-out tab, click the Service Name pulldown to select the service you want for this use, as shown here where the sample again uses CorticonADC.read .
3. On its Runtime Properties tab. Use the Property pulldown:
a. Select Datasource Name, and then, for its value, use the dropdown menu to select the Datasource that corresponds to the name of the appropriate ADC definition. For the ADC sample, enter Treatment Data.
b. Select Query Name, and then, for its value, use the dropdown menu to select the appropriate query. For the ADC sample, choose TreatmentDetails. The listed values are initially imported and are updated by the QUERIES: Import function on the Query tab.