Trigerring Progress 4GL Triggers from Java Data Update

patelspam

New Member
Hello!

I've been developing Java code with the purpose of creating an API to be used by my company clients.
I reached a point where i need to create a POST and this particular POST is supposed to apply certain changes to a table. This table has some triggers defined in his table definition which update more than 10 other tables. Since it has a lot of code, it's going to take a lot of time to convert it to java (or sql trigger) , so I wanted to know if there is a way to go around it.
I don't want to use any AppServer (that would lose the point of using an API).

Does anyone know any possible solution or workaround for this problem?

JP
 

TomBascom

Curmudgeon
An appserver *is* an API. It might not be written in your favorite language or using your chosen special sauce but it is definitely an API.

4GL triggers need a 4GL runtime. There is no way to run them without that. One way to get that is with an appserver. You could use "classic" appserver or PASOE (you haven't mentioned what version of Progress this is) or you could write a 4gl socket based server of your own. Or you could go old school and setup a cgi-bin script that calls an old fashioned batch program... It all depends on what tools and skills you have available and how much trouble you're willing to go to.
 

patelspam

New Member
An appserver *is* an API. It might not be written in your favorite language or using your chosen special sauce but it is definitely an API.

4GL triggers need a 4GL runtime. There is no way to run them without that. One way to get that is with an appserver. You could use "classic" appserver or PASOE (you haven't mentioned what version of Progress this is) or you could write a 4gl socket based server of your own. Or you could go old school and setup a cgi-bin script that calls an old fashioned batch program... It all depends on what tools and skills you have available and how much trouble you're willing to go to.
Hey Tom!
Thanks for the answer.
I decided on running (in java) a .p using proenv (by excuting it ('Runtime.getRuntime().exec()'). In that procedure I trigger the triggers i want.
This seemed to be the simpler solution to this problem, which will also help in the future for other triggers I'll need to trigger.
 
Top