I need to extract data from the published document which is created by the adapter notification and write it to a file
can u guys help in extracting the data from the Published document
Not sure how far you got with this. But her is my 2 cents: Once you have created the notification document, publish it to the Broker and subscribed to it via a Trigger, you should be able to redirect that document to the assigned service for that trigger, the service pipeline should then contain the document. Be sure to fully qualify the the document name for you service inputs to view the document. Once in your service pipeline, it’s just like any other document.
i catch ur point.
but how to subscribe to the notification document via trigger.
can u pls make it fast.
Ok I’ll try to make this a quick!
I’m looking at 6.1 using JDBC Adapter Notification. Same should apply to 6.0.1
From developer, after successfully creating your JDBC Connection and creating, say an InsertNotification,
called test.notify:DBInsertNotification. This also generates a test.notify:DBInsertNotificationDocument
make sure it’s publishable and in sync with the Broker.
If connected to the Broker, this document should be published automatically or you can publish it
using sync option at a later time.
Now create a Trigger call test.notify:insertTrigger
set the following:
In document types and filters
Add - test.notify:DBInsertNotificationDocument
Name - “something meaningfully”
Service - test.notify:targetService
In you test.notify:targetService
Add Document Reference - test.notify:DBInsertNotificationDocument
(Reference should be fully qualified)
When the insert notification occurs, the trigger should re-direct to the service and then you can Map as usual.
i did exactly the same way as u told and i created test.notify:targetService
to write the data to a text file but it writes “null” in the text file
The fact that the service is executed means that the document gets there and it is valid. Pleas make sure the notification was actually configured to return the fields in the record being updated. You have to manually add the fields and table name to be able to see data being returned. Returning all fields as String usually works well for testing.
I would enable Audit Logging
- Error and Success
- Always include pipeline
You would need the WmMonitor (Services ->Search section “search by Current ContextID”) to take a look at the pipeline data.
Not sure if you are using pub.flow.savePipelineToFile, but that should also show you the data.
Is there any other option to configure to return the fields in the record being updated?.I added the table name and fields in the adapter notification editor.
any way i tried with using pub.flow.savePipelineToFile,it shows the data in the document but it shows only the last record of the set of records inserted
Looks like these multiple updates are part of a single transaction.
You may have to commit updates one at a time to get multiple publishes on this doc.
Thanks Dezi for ur quick response
Also, take a look at the following:
webMethods JDBC Adapter Userâ€™s Guide Version 6.0.3 (pg. 137)
An OrderedNotification publishes notification data for multiple insert, update, or delete operations on multiple tables.