Create and configure message flows
that respond to events in a database.
Before you begin
Read
the following topics:
Check which databases are supported on which platform,
and if any restrictions apply:
Ensure that your database is configured to record events (uses an event table), and that you know
how to query those events.
If you use DB2® on
z/OS®, your user ID (or your
user group) requires permission to perform a SELECT on SYSIBM.SYSJAROBJECTS.
Complete
the following tasks:
- Add a database definition to the IBM App Connect
Enterprise Toolkit.
About this task
When you drag a DatabaseInput node onto the
canvas, IBM App Connect Enterprise creates an ESQL
module that contains boilerplate text. To configure the DatabaseInput node, modify
the statements in that module to suit your requirements.
When
you double-click the node to modify the ESQL code, the editor displays
the Database Event Design tab for the module.
Complete the mandatory fields and then click Generate query.
To view or modify the code, click the Source tab.
Code that has been generated is clearly marked by color-coded --@!{
and --@!}
comments.
Any changes that you make within these comments are lost if you regenerate
the code.
Procedure
- In the IBM App Connect
Enterprise Toolkit, drag
a DatabaseInput node onto
the canvas, and double-click the node.
The Database
Event Design tab is displayed. Ensure that the correct
module is selected.
- Complete the Event Table section.
- Optional: Complete the Database
schema property.
Leave it blank to use the default
runtime schema.
- Complete the Table property.
This
property represents the database table used as your event store.
- Complete the Primary key property.
This property represents the primary key of the database table
used as the event store.
- Complete the Foreign key to application table property.
This property represents the column in the event table that
references the row in the application table containing the changed
data to be processed by the DatabaseInput node. This is typically
the primary key of the application table.
- Optional: Complete the Status column property.
This property represents the name of a column, if you update
a column in the event table to indicate that the event has been processed.
Leave blank if you delete events from the event table after processing.
- Optional: Complete the New event
status value property.
This property represents
the value written to the status column when the event is first added.
Enclose character values in single quotation marks, for example 'Y'.
Enter numbers without quotation marks. For a null value, enter NULL.
Check the trigger setting in your database for appropriate values.
- Optional: Complete the Processed
event status value property.
This property represents
the value written to the status column after the event has been processed.
Enclose character values in single quotation marks, for example 'Y'.
Enter numbers without quotation marks. For a null value, enter NULL.
Check the trigger setting in your database for appropriate values.
- Complete the Application Table section.
- Complete the Table property.
This
property represents the table that includes the changed data to be
processed by the DatabaseInput node.
- Complete the Primary key property.
This property represents the primary key of the database table
used as the application table.
- Complete the Output message element property.
This property represents the output message that will be propagated
to the flow.
- Click Generate query.
- Optional: Click the Source tab
to view the code, or add customized code.
-
On the Basic tab of the DatabaseInput node, specify the data source. This data source is the ODBC data source name of the database that
contains the tables that you refer to in the ESQL module.
- On the Basic tab, ensure that the ESQL module property refers to the
correct module.
- Optionally, change values on the other tabs of the node.
- Configure the rest of the flow to use the message from
this node.
What to do next
Configure your target system to
receive the message.