Develop a Trigger

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/template in src/com/xqual/trigger/acme_trigger
  • Modify the package and the static variable TRACE_HEADER in the CTriggerImpl.java source file
  • Copy and rename build/buildTemplateTrigger.bat in build/buildMyAcmeTrigger.bat
  • Edit the build script buildMyAcmeTrigger.bat and change
    - the variable JAVA_HOME to point to your JDK.
    - the name of the trigger in the script XSTUDIO_TRIGGER_NAME=my_acme
  • Run buildMyAcmeTrigger.bat
  • You should get a file my_acme.jar in the bin folder...

Congrats! you compiled your void trigger.