Running post-publish stored procedure in the database

Running post-publish stored procedure in the database

  

Hello OS family,


I'm relatively new to the Outsystems platform and I'm doing most of the database modeling for our enterprise. We would like to run a process (basically calling a stored procedure) after every time we publish one of the modules. 

The stored procedure drops and re-creates a set of views that are more friendly named than the tables. I would like to run this anytime anyone hits the big green publish button. That way any changes will be updated in the database and we can use the friendly named views for our database related needs.

Let me know what you think.


Thanks, Ben

Hi Benjamin,

Here's one way to achieve that:

  1. Create a server action with an "SQL" element that executes your stored procedure.
  2. In your eSpace's "Processes" tab, create a new timer and set its "Action" property to the action you created and "Schedule" property to "When Published".

Best regards.