Hello,
I am new to Progress world and trying to implement the below:
Whenever any update / delete / insert is happening on OpenEdge database, send a message to messageQueue.
I am using Stomp adapter to connect to Message Queue. I am able to send basic messages using triggers.
Now what I want is to put the new and old data (in case of update) in a string format and then send to MessageQueue.
Am facing the below challenges:
1. Getting the Old / New objects properly (It comes null I dont know why)
2. Convert them to a string or a JSON Object.
Can some one please help me in getting this done.
Basically what I need is a trigger example for create & write and a method to convert them to String or JSON string.
--------------------------------------------------------------------
Below is a initial set what I am doing --
My trigger calls the below code passing {2} as CREATE/WRITE and {1} as table name MORTGAGE
------------------------------------------------------------------------------------------------
{javax/jms/MessageSender.i}
TRIGGER PROCEDURE FOR {2} OF {1}
&IF "{2}" = "WRITE"
&THEN
NEW BUFFER {1}
OLD BUFFER OLD{1}
&ENDIF .
&IF "{2}" = "WRITE"
&THEN
RUN QueueSender ("{1}","{2}",NEWDATASTRING.OLDDATASTRING).
&ENDIF .
&IF "{2}" = "CREATE" OR "{2}" = "DELETE"
&THEN
RUN QueueSender ("{1}","{2}",NEWDATASTRING."").
&ENDIF .
-------------------------------------------------------------------------------------------
Here I don't want to hardcode the column names and need to build a generic way to read the bufferand put that in a string or JSON.
Any help is deeply appreciated.
Thanks
I am new to Progress world and trying to implement the below:
Whenever any update / delete / insert is happening on OpenEdge database, send a message to messageQueue.
I am using Stomp adapter to connect to Message Queue. I am able to send basic messages using triggers.
Now what I want is to put the new and old data (in case of update) in a string format and then send to MessageQueue.
Am facing the below challenges:
1. Getting the Old / New objects properly (It comes null I dont know why)
2. Convert them to a string or a JSON Object.
Can some one please help me in getting this done.
Basically what I need is a trigger example for create & write and a method to convert them to String or JSON string.
--------------------------------------------------------------------
Below is a initial set what I am doing --
My trigger calls the below code passing {2} as CREATE/WRITE and {1} as table name MORTGAGE
------------------------------------------------------------------------------------------------
{javax/jms/MessageSender.i}
TRIGGER PROCEDURE FOR {2} OF {1}
&IF "{2}" = "WRITE"
&THEN
NEW BUFFER {1}
OLD BUFFER OLD{1}
&ENDIF .
&IF "{2}" = "WRITE"
&THEN
RUN QueueSender ("{1}","{2}",NEWDATASTRING.OLDDATASTRING).
&ENDIF .
&IF "{2}" = "CREATE" OR "{2}" = "DELETE"
&THEN
RUN QueueSender ("{1}","{2}",NEWDATASTRING."").
&ENDIF .
-------------------------------------------------------------------------------------------
Here I don't want to hardcode the column names and need to build a generic way to read the bufferand put that in a string or JSON.
Any help is deeply appreciated.
Thanks