Working Scenario :- step by step code logic
Summary :-
Whenever data get insert into DB table column basic notification get trigger data and it change DB table column status from N to Y
by using trigger you can subscribe basic notification documents publish in broker and trigger subscribe service to capture data from DB by using
debug log flow step
Prerequisite :- Oracle DB/wM IS
-
Create DB Table aka Buffer table with table name BufferTest & schema webMethods in oracel DB
CREATE TABLE webMethods.BufferTest
( “EMPID” VARCHAR2(10),
“ENAME” VARCHAR2(20),
“STATUS” VARCHAR2(5)
) -
Write a SQL script to create DB trigger for table name BufferTest
CREATE OR REPLACE TRIGGER webMethods.BufferTrigger AFTER INSERT ON webMethods.BufferTest BEGIN NULL; -
Create basic notification in wM designer with table name webMethods.BufferTest in SELECT tab
select Record ID Column “EMPID” & Mark Id Column “STATUS” & check box Exact Once Notification option as well
Enable same basic notification from IS Admin page :- Adapters > JDBC Adapter > Polling Notifications
& Edit Interval(second) 20 sec and check box immediate -
Write Insert adapter service on table name BufferTest so that you can insert data into DB table webMethods.BufferTest
-
Write simple subService to capture data with flow step pub.flow.debugLog and input will be your basic notification document
-
Write trigger with service name subService and doc name is your basic notification document and enable it.
Test Scenario :-
Insert data by using insert adapter service & check status field name in Oracle DB to change status from N to Y as well as verify same that subscribe service debug log entry in IS admin page server/error logs