Adapter Development Kit 6.5 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Using the Sample Adapter | Phase 5: Adding Listener Notifications
 
Phase 5: Adding Listener Notifications
 
Implementing the Listener
Implementing the Asynchronous Listener Notification Template
Configuring and Testing the Listener and the Listener Notification Nodes
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:
*Implement the listener.
A listener object is connected to the adapter resource, waiting for the system to deliver notifications. See Implementing the Listener.
*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.
*Configure the listener. See Configuring the Listener Node.
*Use the template to configure two asynchronous listener notification nodes (one for check deposits, the other for negative balances). See Configuring the checkDepositListener Notification Node.
*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.
*Test the listener notification nodes. See Testing 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.