Multiple Data Sources with HCL Domino
In modern Domino environments, simple point-to-point data transfer is rarely sufficient. Complex processes require data from several Notes databases, relational database systems, files, web services and other interfaces at the same time.
The central challenge is: “How can heterogeneous sources and target systems be combined and processed within one controlled workflow?”
A Data Connection Is Not Yet an Integration Process
Traditional connectors frequently provide only point-to-point transfers. Real business processes, however, must combine data from several sources before decisions can be made or values can be written back to different systems.
- frequently designed around individual one-to-one connections
- limited processing logic during the transfer
- distributed error handling across several modules
- high overhead from many individual queries
- simultaneous access to multiple servers and systems
- rule-based transformation directly within the workflow
- server-side performance and centralized logging
- controlled error handling and reproducible processing
Scalable and Server-Side for Large Data Volumes
The Domino API Engine runs as a native server component. Connections and database handles are opened when the script starts and reused throughout processing. This eliminates the repeated initialization overhead of separate agent runs or continuous connect-disconnect cycles.
A Directly Testable Workflow with Notes and MySQL
The evaluation package contains an intentionally compact example using two Domino databases, two MySQL databases and CSV test data. MySQL is used only as an immediately reproducible reference implementation; the underlying concept is not limited to MySQL.
- order data from one Domino database
- customer master data from a second Domino database
- item information and prices from one MySQL database
- the customer balance from another MySQL database
- CSV files for preparing the test data
The demo script combines this data, creates an order confirmation as a Domino response document, updates the customer balance and marks the original order as completed after successful processing.
INCLUDE("!!MULTIPLE_DATA_SOURCES_CONFIG");
/* Open the two Domino databases. */
OrdersDBh := @OpenDB(OrdersNotesDBPath);
CustomersDBh := @OpenDB(CustomersNotesDBPath);
/* Initialize two independent MySQL connections. */
MySQLhCustomers := @MySQLInit;
MySQLhItems := @MySQLInit;
@MySQLConnect(
MySQLhCustomers;
MySQLHostCustomers;
MySQLUserCustomers;
MySQLPasswordCustomers;
MySQLDefaultDatabaseCustomers
);
@MySQLConnect(
MySQLhItems;
MySQLHostItems;
MySQLUserItems;
MySQLPasswordItems;
MySQLDefaultDatabaseItems
);
/* Select all unprocessed order documents. */
OrdersSelectFormula :=
"SELECT Form=\""+OrderFormName+"\" & Done!=\"1\";";
IDLOrderDocs := @ScanDB(
OrdersDBh;
OrdersSelectFormula;
@AnyAllDay;
1;
1
);
/* Read the keys required for the combined processing. */
ThisOrderDoch := @OpenNoteByID(
OrdersDBh;
ThisOrderDocID;
ThisOrderDoch
);
CustomerNr := CustomerNr[ThisOrderDoch];
ItemNr := ItemNr[ThisOrderDoch];
/* Combine the Domino and MySQL data. */
CALL:DoBookOrder(
&MySQLhCustomers;
&MySQLhItems;
&CustomersDBh;
CustomerNr;
ItemNr;
&RetDoUpdate
);
/* Update the source order only after successful processing. */
IF(RetDoUpdate = 1){
Done[ThisOrderDoch] := "1";
}
ThisOrderDoch := @CloseNote(
ThisOrderDoch;
RetDoUpdate
);
Test the Multiple Data Sources Example Yourself
The updated evaluation package contains the configuration include script, the preparation script, the actual demo script, the Domino test databases and the required CSV test data.
