Hi,
Can any body know exactly what is the difference between
these notifications.
Thanks
VInay
Hi,
Can any body know exactly what is the difference between
these notifications.
Thanks
VInay
Hi Vinay,
Basic Notification - pools on a table , on insert of any new
records in the table the notification is triggerd.
Insert/Update Notification - pools on the Insert of a new
row/ update of the table on a column/columns . Here you
would need to specify which column being traked for updates.
Hope this help!
Savita
hi friends.
i have created a service which is using insert/delete and upadate notifications.Now i need to do it with a basic notification.How do i do that.
1)Suppose i have a table X will the basic notificatuion work on the the same table or do i need to create some other table?
2)what will the struture of the trigger which will take care of the insert/update/delete?
3) how will the service understand i mean what will determine that its an update/delete/insert?
thanks and regards
Avinash
You get to create the buffer table(s) and trigger(s) to populate them manually. Often, you can use buffer tables, triggers and sequences created by the Insert, Update and Delete notifications as templates.
Once your triggers are populating the buffer tables correctly, you can create the BasicNotification to poll it on some regular frequency. When the notification finds documents in the buffer table it publishes a notification document for each row with the columns you specify. After the document is published the row is deleted (unless you specify otherwise).
One reason for using BasicNotifications is that the DBA’s in some IT shops do not allow webMethods developers to create database objects. By using a BN, you have to manually create and deploy the database. This can be done by the DBA where required.
Another advantage of using BasicNotifications is that these database objects are not deleted when the notification is disabled. Disabling the notification simply stops the polling of the buffer table. When the notification is enabled again, polling resumes and notification documents are published for any rows in the buffer table.
To build your own triggers, you need to be reasonably proficient in the procedural SQL language provided by your DBMS vendor. Examining the triggers generated by WM for Insert/Update/Delete/Ordered notifications can help get you started.
HTH,
Mark
hi,
Can anyone help me with writing a trigger which will help me to carry basic notification.
i have a table x with three fields x1,x2,x3.
i need a trigger which will insert data in a buff table y.
the buff table has three fields .
My requirement is:
when data is inserted in table x trigger is fired and data goes to table y.When this happens data goes to y plus i need a parameter which will be set to I for inserts , U for Updates and D for deletes and then i need to carry out notifications on this buffer table y.
will these extra field in table y be a field in the buffer table of y or something else?
Thanks and regards
Avinash
Aneel,
I am neither DB admin nor having sound knowledge of PL\SQL, but i found this logically wrong,while using AFTER DELETE, the values to be inserted into table y should be : OLD & not :NEW
I hope the solution should be
CREATE OR REPLACE TRIGGER MyTrigger
AFTER INSERT OR UPDATE OR DELETE ON TableName FOR EACH ROW
DECLARE
BEGIN
IF INSERTING THEN
insert into buffertable values (:NEW.x1, :NEW.x2, :NEW.x3, ‘I’);
END IF;
IF UPDATING THEN
insert into buffertable values (:NEW.x1, :NEW.x2, :NEW.x3, ‘U’);
END IF;
IF DELETING THEN
insert into buffertable values(: OLD.x1, : OLD.x2, : OLD.x3, ‘D’);
END IF;
END;
Kindly guide me if i am wrong.
Regards,
Puneet Saxena
Hi Aneel/Puneet,
thanks for your efforts for helping me out. i worked out my basic notification, its working fine
Hope to hear more from you
thanks and regards
avinash
Hi mark
thanks for your explanation on basic notification. my understanding on basic notifications was clear from the article you posted.
thanks again
Avinash
Hi,
In response to the trigger
CREATE OR REPLACE TRIGGER MyTrigger
AFTER INSERT OR UPDATE OR DELETE ON TableName FOR EACH ROW
DECLARE
BEGIN
IF INSERTING THEN
insert into buffertable values (:NEW.x1, :NEW.x2, :NEW.x3, ‘I’);
END IF;
IF UPDATING THEN
insert into buffertable values (:NEW.x1, :NEW.x2, :NEW.x3, ‘U’);
END IF;
IF DELETING THEN
insert into buffertable values(: OLD.x1, : OLD.x2, : OLD.x3, ‘D’);
END IF;
END;
I now need to write a sequence which will delete the records in the buffer table after processing it. what will be the structure of the sequence?
Thanks and regards
Avinash
Puneet,
You are right. Classic copy paste mistake
The basic notification will automatically delete the records in the buffer table, if properly configured. The JDBC Adapter User’s Guide is your friend.