CREATE OR REPLACE TRIGGER "WFS"."TRG_JBPM_VARIABLEINSTANCE_UPD" 
BEFORE UPDATE ON WFS.JBPM_VARIABLEINSTANCE
FOR EACH ROW
BEGIN

 SELECT SYSTIMESTAMP
 INTO :NEW.UpdateDate
 FROM DUAL;

END;
/

CREATE OR REPLACE TRIGGER "WFS"."TRG_JBPM_VARIABLEINSTANCE_SEQ" 
 BEFORE INSERT ON WFS.JBPM_VARIABLEINSTANCE
 FOR EACH ROW
 BEGIN

   IF :NEW.ID_ IS NULL THEN
     SELECT WFS.JBPM_VARIABLEINSTANCE_SEQ.NEXTVAL INTO :NEW.ID_ FROM DUAL;
   END IF;

END;
/