Adapter for JDBC 10.3 | webMethods Adapter for JDBC Documentation | webMethods Adapter for JDBC Installation and User’s Documentation | Adapter Notifications | Configuring BasicNotifications | Creating a BasicNotifications
 
Creating a BasicNotifications
You configure notifications using Designer.
Be sure to review the section Before Configuring or Managing Notifications before you configure notifications.
*To configure a BasicNotification
1. In Designer, right-click the package in which the notification should be contained and select New > Adapter Notification.
2. Select the parent namespace, type a name for the adapter notification, and click Next.
3. Select Adapter for JDBC as the adapter type and click Next.
4. Select the BasicNotificaton template and click Next.
5. Select the appropriate Adapter Connection Name and click Next.
The name of the publishable document associated with this notification is displayed.
6. Click Finish.
For more information about adapter notifications and publishable documents, see Adapter Notifications. For more details about the Integration Server publishable documents, see the Publish-Subscribe Developer’s Guide for your release.
7. Designer creates the notification, and the editor for the adapter notification appears.
a. You can select the Adapter Settings tab at any time to confirm adapter notification properties such as the Adapter Name, Adapter Connection Name, and Adapter Notification Template, as necessary.
b. In the Publish Document section, you can specify how you want the notification document to be published:
*To publish documents to Broker, select Broker/Local. This is the default option.
*To publish documents to a JMS provider, select JMS Provider, and provide values for the following input fields:
Field
Description/Action
Connection alias name
The name of the JMS connection alias configured on Integration Server.
If the connection alias is a Broker Cluster configured with Multisend Guaranteed policy, you must add the watt property watt.art.notification.jmsSend.usePublicService and set it to true.
Note:
Adapter Runtime does not support LOCAL_TRANSACTION and XA_TRANSACTION type JMS connection alias.
Destination name
The name of the destination from which you want the JMS trigger to receive messages.
Destination type
Whether the destination is a Queue (default) or a Topic.
The information from the Permissions tab appears in the Properties panel.
8. Select the Tables tab and use the following fields:
Note:
For AS/400 DB2 V4R5 using a jt400.jar file, the table name for the notification cannot exceed 10 characters; otherwise, an exception will be generated when you try to enable the notification.
Field
Description/Action
Table Alias
The table alias is automatically assigned when you select more than one table in the Table Name field. The default is t1.
Table Name
Select a table name. The default for the associated catalog name is current catalog. The default for the associated schema name is current schema. The table name must not contain a period. If the table name does contain a period, Designer will throw an error.
Note:
Informix databases do not allow you to specify a catalog and database name because you can only access the current catalog.
Type
The table type displays automatically based on the table you select.
9. If you are not joining tables, skip this step. Select the Joins tab to specify the columns for joining the tables you just configured.
a. Select the icon (or the icon to fill in all rows of the table) to create new left and right columns.
b. Select Left Column and select the first table's joining column.
c. Select the appropriate Operator.
d. Select Right Column and select the next table's joining column.
e. Repeat until you have defined all the joins.
10. Use the SELECT tab to define the columns and fields to be selected.
a. In the ALL/DISTINCT field, select ALL to include duplicate rows or DISTINCT to suppress duplicate rows. Selecting ALL corresponds to the SQL statement SELECT ALL name from tablename. The default value is blank, which corresponds to the SQL statement SELECT name from tablename.
b. Select the icon (or the icon to fill in all rows of the table) to create new fields as needed.
c. In the Expression field, select a column or type any valid SQL expression. The corresponding Column Type, JDBC Type, Output Field Type, and Output Field display for each column you select in the Expression field. Use the following fields:
Field
Description/Action
Expression
The column name or SQL expression.
Column Type
The column data type defined in the database table.
JDBC Type
The JDBC type of the corresponding Output Field.
Output Field Type
The data type of the output field. Adapter for JDBC automatically converts database-specific types to Java data types. For a list of JDBC type to Java type mappings, see JDBC Data Type to Java Data Type Mappings.
Output Field
The name of the field containing the output from the SELECT operation. An output field name displays when you select an expression. You can also modify the output field names as required.
Sort Order
Specifies ordering of publishable documents per each polling. Use this field to ensure that the notification's publishable documents, for each polling, are in the correct ascending or descending order based on one or more table columns. Select either Ascend or Descend. Leave the field blank if there is no sort order.
d. If you want the notification's publishable document to be published to the local Integration Server, select the Publish Locally option.
By default, this option is not selected, that is, if the Broker is configured to Integration Server, the publishable document is published to the Broker; otherwise the publishable document is published to the local Integration Server.
Selecting the Publish Locally option reduces performance problems, if Integration Server is connecting to a remotely located Broker that is in turn triggering a service on the local Integration Server.
e. If you want to use the Exactly Once notification feature, you must enable the Exactly Once Notification option. For more information, see Using the Exactly Once Notification Feature.
f. Set the Delete selected records flag to automatically delete the selected records from the buffer table (based on their Record ID Column value) after the notification. Use this option to prevent publishing the same documents to Integration Server each time polling occurs.
Note:
Running a BasicNotification may generate a duplicate message error. Integration Server will ignore the duplicate notification document. In this case, you should check the Delete selected records option and choose a column with sequentially unique values as the Record ID Column value next in the procedure.
g. You must use the Record ID Column field to use the Exactly Once notification feature. Select the column from the buffer table that you want to use as the unique ID for the publishable document for this notification. For more information, see Using the Exactly Once Notification Feature.
To ensure that all values will be unique, choose a table column in the Record ID Column field whose values are sequential numbers.
h. Use the Mark ID Column field to mark the records as processed. Select the column that you created in the database table to hold the status of the record. Use this option when you do not want to set the Delete selected records flag, and also want to avoid the publishing of duplicate records. For information about creating the column that holds the status of the records and marking the records as published, see Basic Notifications.
i. Use the Maximum Row field to specify the maximum number of records to retrieve from the database. This field is useful when you are working with a large number of records and you want to limit the number of documents sent each time the notification polls.
The default value of 0 (no limit) retrieves all records.
j. Use the Query Time Out field to specify the query time out value of the BasicNotification you are configuring. This value is the amount of time Adapter for JDBC waits for the notification to execute before stopping the SQL operation.
The default value is -1. Use the default value to have the notification use the value indicated on the watt.adapter.JDBC.QueryTimeout property as the time out.
If you specify a value equal to 0, or if the watt.adapter.JDBC.QueryTimeout property is not set, the notification executes without a time out.
If you specify a value greater than 0, the notification executes with the specified value as the time out.
Note:
-1 is the only permissible negative value for this field.
For more information about the watt.adapter.JDBC.QueryTimeout property, see Forcing a Timeout During Long-Running SQL Operations in Services and Notifications.
11. Use the WHERE tab to specify the WHERE conditions on the SQL query statement for selecting information:
a. Select the icon to define new WHERE clause fields.
b. Select a logical operator from the AND/OR field, an Operator, and separators (the left and right parentheses) as needed, and use the following fields:
Field
Description/Action
AND/OR
The logical operator.
Column
The name of the column you want to use in the WHERE clause.
Operator
The operator used with the Column and Input Field.
Input Field
Type a fixed value in this field. Be sure that it is a valid value, or an exception will be generated at run time.
Note:
For Oracle users, if you use a CHAR(n) data type and enter a value in the Input Field, Adapter for JDBC automatically sets the ORACLEFIXED_CHAR data type as the JDBC data type.
c. If necessary, use the or icons to change the order of the WHERE clause to ensure the parameters are parsed in the correct order.
d. Repeat this procedure until you have specified all the WHERE parameters.
12. The information about using the Permissions tab to assign an access control list (ACL) to an element appears in the Properties panel.
13. From the File menu, select Save.
14. You must schedule and enable the notification using Integration Server Administrator before you can use it. For details, see Managing Polling Notifications.