Phase 5: Adding Listener Notifications
This phase represents the adapter with all its functionality. In this phase, the adapter now includes the definition for a listener notification template that you can use to configure listener notification nodes. These nodes will receive alerts immediately from the Sample Server when checks have been deposited and when accounts have negative balances. This section describes how to:
![*](chapterTOC_bullet.png)
Implement the listener.
A listener object is connected to the adapter resource, waiting for the system to deliver notifications. See
Implementing the Listener.
![*](chapterTOC_bullet.png)
Implement the asynchronous listener notification template.
An asynchronous listener notification publishes a document to a
webMethods Broker queue, using the doNotify method. You will create a trigger that receives the document and executes an
Integration Server flow service to process the document's data. See
Implementing the Asynchronous Listener
Notification Template.
![*](chapterTOC_bullet.png)
Create an
Integration Server trigger and a flow service for each listener notification node.
The notifications publish their result documents to the triggers. Upon receiving a document, the trigger causes the
Integration Server to invoke a flow service registered with the trigger to process the data contained in the document. In the Sample Adapter, the flow service invokes the pub.flow:savePipelineToFile service. This service simply saves the notification event to a file. Typically, this service is used as a debugging tool. It is provided here simply to demonstrate the use of the notification. In a real adapter, you would typically perform some kind of action with the notification data. See
Creating the Trigger for the
checkDepositListener Notification Node and
Creating the Flow Service for the
checkDepositListener Notification Node.
Note:
There is no need to compile the Phase 5 implementation. The WmSampleAdapter package represents the Phase 5 (final) implementation package as delivered.