Creating ordered polling notifications
Create an ordered polling notification to retrieve new or updated database records in sequence by using a timestamp or incremental ID. This notification type helps ensure reliable, in-order processing of data changes, making it ideal for scenarios that need strict event sequencing or state tracking.
Before you begin
- Make sure that the messaging capability is enabled for your webMethods Integration environment.
- You have the details of the database that you want to connect to, such as user account, driver group, database name, credentials, and server name.
- The database user must have privileges to create table, trigger, and sequence.
About this task
In this example, an ordered polling notification is created to log a message when multiple operations are run on a single table within a database, by using the same publishable document. Assume a scenario where multiple operations such as insertion, deletion, and updates are run on a single table named PERSON.
Creating and testing polling notifications involves the following steps:
- Create a database account. For more information about creating Database accounts, see Creating accounts.
- Create a polling notification.
- Create a flow service to run when the notification is received.
- Verify that the flow service runs when the notification is received.
Procedure
Creating flow services
About this task
Procedure
- Go to .
- Select the Flow flow service to edit. The Flow service editor page is displayed.
- On the flow service step, type documentToJSONString to convert the incoming document to a JSON string.
- Click View/Edit Pipeline to map the input and output fields to the
service. The Pipeline panel is displayed.
- Map the pipeline input to the input document field in documentToJSONString.
- On the flow service step, type logCustomMessage to log the message.
- Click View/Edit Pipeline to map the input and output fields to the
service. The Pipeline panel is displayed.
- Map the pipeline input to the input message field in logCustomMessage.
- Click Save to save the service.
Verifying flow services
About this task
Procedure
- Go to .
- Filter the results for the project that is used to create flow service.
- Use any database client to do the insert, delete, and update operation. This example a Delete operation is done, then an Update and an Insert on the same table, PERSON.
- Click the Refresh icon in the
page. You can notice that the status is Success, which means that the flow service has run without any errors.
- Click the flow service to view the log details. In this example, you can see that the notifications are received in the order of operations ran. The polling notification is first received for the person details that was deleted, then the updated records, and lastly by the newly inserted person record by using the database client.