Preparation
Before coding a new trigger from scratch, the best is to duplicate the "void" template provided in the SDK:Let's assume we want to create a "acme_trigger" trigger. The preparation process is pretty simple and consist in doing the following:
- Copy the folder
src/com/xqual/trigger/templateinsrc/com/xqual/trigger/acme_trigger - Modify the package and the static variable TRACE_HEADER in the
CTriggerImpl.javasource file - Copy and rename
build/buildTemplateTrigger.batinbuild/buildMyAcmeTrigger.bat - Edit the build script
buildMyAcmeTrigger.batand change
- the variableJAVA_HOMEto point to your JDK.
- the name of the trigger in the scriptXSTUDIO_TRIGGER_NAME=my_acme - Run
buildMyAcmeTrigger.bat - You should get a file
my_acme.jarin the bin folder...
Congrats! you compiled your void trigger.