importXML.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. let shared = require("DCIS/dcisFcns");
  2. var console = require("console");
  3. var LABKEY = require("labkey");
  4. var analysis = require("analysisModule/analysisFcns");
  5. //how routines implemented from java look in javascript:
  6. //https://docs.nativescript.org/runtimes/android/marshalling/java-to-js
  7. function init(event, errors) {
  8. console.log("init() called in orgs.js with an event type of " + event);
  9. console.log("Function in shared TriggerFcns.js script returns :" + analysis.sampleFunc('echo'));
  10. }
  11. function complete(event, errors) {
  12. console.log("complete() called in orgs.js with an event type of " + event);
  13. }
  14. function beforeInsert(row, errors){
  15. console.log("beforeInsert() called in orgs.js with a row object of " + row);
  16. row.status=2;
  17. }
  18. function beforeUpdate(row, oldRow, errors){
  19. console.log("beforeUpdate() called in orgs.js with a row object of " + row + " and an oldRow of " + oldRow);
  20. }
  21. function beforeDelete(row, errors){
  22. console.log("beforeDelete() called in orgs.js with a row object of " + row);
  23. }
  24. function afterInsert(row, errors){
  25. console.log("afterInsert() called in orgs.js with a row object of " + row);
  26. shared.startImport(LABKEY,analysis,console,row);
  27. }
  28. function afterUpdate(row, oldRow, errors){
  29. console.log("afterUpdate() called in orgs.js with a row object of " + row + " and an oldRow of " + oldRow);
  30. }
  31. function afterDelete(row, errors){
  32. console.log("afterDelete() called in orgs.js with a row object of " + row);
  33. }