...
Code Block |
---|
title | Custom Database Trigger Example |
---|
collapse | true |
---|
|
USING Progress.Lang.*.
BLOCK-LEVEL ON ERROR UNDO, THROW.
CLASS Custom.CustomDatabaseTriggerLoadService
INHERITS Akioma.Swat.Server.Startup.DatabaseTriggerLoadService: //inherits the existing SWAT implementation
METHOD PUBLIC OVERRIDE VOID LoadTriggers():
SUPER:LoadTriggers(). //calls super in case triggers are loaded from SWAT
RUN loadCustomTriggers.p PERSISTENT. // procedure to include custom triggers
END METHOD.
END CLASS. |
...
Code Block |
---|
title | loadCustomTriggers.p |
---|
collapse | true |
---|
|
{Custom/Triggers/myCreateTrigger.i} //here, we just include the desired triggers |
Info |
---|
|
Each trigger can be a separate procedure (.p) - the directory of these triggers needs to be in the PROPATH |
Trigger implementation
Inside the trigger itself:
...