3 Replies Latest reply on Dec 10, 2015 3:00 PM by WVanSluys1

    Jython Execution and fdmAPI.getProcessStates() Values

    WVanSluys1

      Hello,

       

      I am trying to trap the PROCESSSTATUS for Event execution and I am seeing things that do not make sense.

       

      I put a version of this script into my events to see the current value of PROCESSSTATUS.

       

      fdmAPI.logInfo("-----------------------------------------------")

      fdmAPI.logInfo("                start BefImport")

      fdmAPI.logInfo("-----------------------------------------------")

      stat = fdmAPI.getProcessStates(fdmContext["LOADID"])

      strProcStatus = str(stat["PROCESSSTATUS"])

      fdmAPI.logInfo("ProcStatus: " + strProcStatus)

      impStatus = str(stat["IMPSTATUS"])

      fdmAPI.logInfo("impStatus: " + impStatus)

      fdmAPI.logInfo("-----------------------------------------------")

      fdmAPI.logInfo("                end BefImport")

      fdmAPI.logInfo("-----------------------------------------------")

       

      when I look at my Process Log...

       

      2015-12-02 10:24:17,713 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:17,713 INFO  [AIF]:                 start BefImport

      2015-12-02 10:24:17,713 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:17,714 INFO  [AIF]: ProcStatus: 2

      2015-12-02 10:24:17,715 INFO  [AIF]: impStatus: 0

      2015-12-02 10:24:17,715 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:17,715 INFO  [AIF]:                 end BefImport

      2015-12-02 10:24:17,715 INFO  [AIF]: -----------------------------------------------

      ....

      2015-12-02 10:24:22,880 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:22,881 INFO  [AIF]:                 start AftImport

      2015-12-02 10:24:22,881 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:22,882 INFO  [AIF]: ProcStatus: 0

      2015-12-02 10:24:22,882 INFO  [AIF]: impStatus: 0

      2015-12-02 10:24:22,882 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:22,883 INFO  [AIF]:                 start AftImport

      2015-12-02 10:24:22,883 INFO  [AIF]: -----------------------------------------------

      ....

      2015-12-02 10:24:23,420 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:23,420 INFO  [AIF]:                 start BefValidate

      2015-12-02 10:24:23,421 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:23,422 INFO  [AIF]: ProcStatus: 1

      2015-12-02 10:24:23,423 INFO  [AIF]: impStatus: 1

      2015-12-02 10:24:23,423 INFO  [AIF]: valStatus: 0

      2015-12-02 10:24:23,423 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:23,423 INFO  [AIF]:                 end BefValidate

      2015-12-02 10:24:23,423 INFO  [AIF]: -----------------------------------------------

      ....

      2015-12-02 10:24:23,459 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:23,460 INFO  [AIF]:                 start AftValidate

      2015-12-02 10:24:23,460 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:23,461 INFO  [AIF]: ProcStatus: 11

      2015-12-02 10:24:23,461 INFO  [AIF]: impStatus: 1

      2015-12-02 10:24:23,462 INFO  [AIF]: valStatus: 1

      2015-12-02 10:24:23,462 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:23,462 INFO  [AIF]:                 end AftValidate

      2015-12-02 10:24:23,462 INFO  [AIF]: -----------------------------------------------

      ....

      2015-12-02 10:24:23,616 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:23,616 INFO  [AIF]:                 start BefExportToDat

      2015-12-02 10:24:23,616 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:23,617 INFO  [AIF]: ProcStatus: 11

      2015-12-02 10:24:23,618 INFO  [AIF]: expStatus: 0

      2015-12-02 10:24:23,618 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:23,618 INFO  [AIF]:                 End BefExportToDat

      2015-12-02 10:24:23,618 INFO  [AIF]: -----------------------------------------------

      ....

      2015-12-02 10:24:24,345 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:24,346 INFO  [AIF]:                 start AftExportToDat

      2015-12-02 10:24:24,346 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:24,347 INFO  [AIF]: ProcStatus: 21

      2015-12-02 10:24:24,347 INFO  [AIF]: expStatus: 0

      2015-12-02 10:24:24,347 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:24,348 INFO  [AIF]:                 End AftExportToDat

      2015-12-02 10:24:24,348 INFO  [AIF]: -----------------------------------------------

      ....

      2015-12-02 10:24:24,449 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:24,449 INFO  [AIF]:                 start BefLoad

      2015-12-02 10:24:24,449 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:24,450 INFO  [AIF]: ProcStatus: 21

      2015-12-02 10:24:24,450 INFO  [AIF]: expStatus: 0

      2015-12-02 10:24:24,451 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:24,451 INFO  [AIF]:                 End BefLoad

      2015-12-02 10:24:24,451 INFO  [AIF]: -----------------------------------------------

      ....

      2015-12-02 10:24:29,230 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:29,230 INFO  [AIF]:                 start AftLoad

      2015-12-02 10:24:29,230 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:29,232 INFO  [AIF]: ProcStatus: 31

      2015-12-02 10:24:29,232 INFO  [AIF]: expStatus: 1

      2015-12-02 10:24:29,232 INFO  [AIF]: -----------------------------------------------

      2015-12-02 10:24:29,232 INFO  [AIF]:                 End AftLoad

      2015-12-02 10:24:29,233 INFO  [AIF]: -----------------------------------------------

       

       

      So my questions are.

      1. Why in BefImport is strProcStatus = str(stat["PROCESSSTATUS"]) returning the last value from a previous run when I am specifying it to use LoadID


      2. Why does impStatus = str(stat["IMPSTATUS"])  not give me a value of 1 in AftImport



      Thanks



      Wayne