The Generic Code Translation filter enables simple lookups in a database table based on message fields to replace or populate other message fields.
The message body is replaced with the data in the file specified in the Message File field, if one is supplied. Following the replacement, the message is parsed using the Definition File and each field in the message (listed in the Substitute Field Mappings field) has its value replaced, which is retrieved from a database, with the respective value.
One or more fields in the message (listed in the Key Field Mappings field) are referenced in order to retrieve required information from the database.
Configuration Properties
Property |
Description |
---|---|
Maximum Concurrency |
The maximum level of concurrency for this filter. A setting of |
Definition File |
Identifies the Message Definition file that defines incoming and outgoing messages. |
Message File |
An optional file that is used to replace the entire message body. This file is used to replace the body of the incoming message before the values are inserted. |
Database |
The type of database to connect to:
|
Host |
The hostname/IP address of the database to connect to. This property is available only if Database is not set to |
Port |
The port number to connect to on the database. |
Database Name |
The name of the database. If This property is available only if Database is not set to |
JDBC Driver |
The name of a JDBC driver class. |
Database URL |
The JDBC URL to connect the database. |
Username |
The database user to connect as. |
Password |
The password for that user. |
Additional Connection Properties |
A list of name/value pairs of message properties to be set on the database connection. The listed properties are not used when Database is set to |
Database Table |
The name of the database table for which to lookup. The SQL statement to be executed has the general form:
|
Key Field Mappings |
An array of Field and Column Name. The message field data is extracted from the input message in order to define required conditions. All listed column names and the respective values are used in the |
Substitute Field Mappings |
An array of "Field" and "Column Name". The listed fields are inserted or replaced by return values of the respective lookup columns in the table. (First row of the result set will be used to populate the message if the SQL statement returns more than one row.) |
Socket Timeout | Specifies how long, in seconds, the underlying connection should remain open before timing out. The socket timeout prevents Rhapsody from waiting indefinitely for results from a database in the event Rhapsody loses its connection to the database. A value of zero indicates the timeout is not configured. |
Published Properties
Published properties for the Generic Code Translation filter are:
ResultRows
- indicates whether there are rows matched in the database by the SQL query used to perform the field translation:Value Description 0 No results 1 Single Result 2 Multiple Results