Polling notifications
Polling notifications are mechanisms that allow the platform to monitor changes in a database and trigger workflows based on those changes. Notifications are useful in event-driven architectures where actions need to be taken automatically when data is inserted, updated, or deleted in a database.
The primary purpose of polling notifications is to detect changes in a data source, often a database table, and respond to those changes. After changes are identified, polling notifications typically publish documents or messages, which contain information about the modifications. These published documents can then trigger further actions, such as starting integrations that process the updated data. For example,
- Alert an accounts representative to add a salary account for a new employee when someone joins the company and a new record is inserted in the employee table.
- Generate an invoice when an item is purchased.
Polling notifications play a key role in building event-driven integrations that respond to data events, making it easy to automate business processes and integrations based on external inputs. The choice of notifications depends on the specific requirements of your integration project and the data sources that you need to connect.
The polling interval is the time duration for the recurring check. You can define this duration while you are scheduling a notification.
- Polling notifications are enabled only for the database connector by default.
- Messaging service must be enabled for polling notifications to work.
- In deploy anywhere flow services, polling notifications are not supported for the database connector.
Polling notification types
Polling notifications vary in how they work depending on the type of notification. The notification types are,
- Insert Notification
- Monitors insert operations with one or more tables and publish the notification data. Notification data is the data, which is inserted in the insert operation.
- Update Notification
- Monitors update operations with one or more tables and publishes notification data. Notification
data is the data, which is updated in the update operation. Use Update Notification to,
- Retrieve either the old, new, or both the old and new values from the database table as output values. The old value is the value that existed before update in the selected column of the database table.
- Set the output value options when you configure Update Notification in the Data fields page.
- Delete Notification
- Monitors delete operations with one or more tables and publish notification data. Notification data is the data, which is deleted in the delete operation.
- Basic Notification
- Polls the tables to detect changes and publishes notification data. It is designed to track modifications in the tables in databases, which do not support triggers. Notification data is the data, which exists in the tables that are monitored.
- StoredProcedure Notification
-
- Obtains the stored procedure's parameters through introspection and lists the signature of the stored procedure when you configure the notification.
- Runs a stored procedure inside a database, retrieves data, and publishes the notification data. The stored procedure returns notification data when it starts.
- Ordered Notification
- Monitors multiple inserts, update, or delete operations on one or more tables for a database, by
creating a single notification that uses the same publishable document. Like Insert Notifications,
Update Notifications, and Delete Notifications, Ordered Notifications use triggers and buffer tables
to capture events that happen on specific tables in a database.Tip: Use the Ordered Notification only if you want to preserve the order in which the operations occur. Else, use Insert Notifications, Update Notifications, or Delete Notifications, because they have better performance.
Polling notifications operational workflow
The tasks that are performed in webMethods Integration when polling notifications are created are as follows.
- For Insert, Update, Delete, and Ordered notifications,
- A buffer table is created to temporarily store changed data before publishing
- A trigger table is created to capture changes when specific operations occur on the source table.
- A sequence is created to uniquely identify the data in the table.
Note:- In Basic Notification, manually create the table by following the data source guidelines. After you create the table, create a basic notification, and make sure that the table is populated with the notification data.
- In StoredProcedure Notification, buffer table, trigger table and sequence are not created.
- Schedules the polling notification.
- Configures the JMS provider details, including account and destination (queue) for publishing data as a document.
- Configures subscriber details, such as name, invocation type, and destination. Also sets the flow service to be triggered upon receiving the document. The flow service contains the next set of actions that must be done after the notification data is received.
- Publishes the notification data to the messaging destination.
Limitations
For more information about database limitations, see the chapter on Database connector.