AutoSys Workload Automation

 View Only
  • 1.  Using notrunning condition causes a loop

    Posted Dec 20, 2017 07:19 PM

    I have a a jobs which cannot run concurrently. My problem is that once the success conditions are met, for some reason the jobs keep start over and over again.

     

    For example, take these two jobs:

    LRST-dist-reptmart-wrapup-clearing-fact01-load-etl-00d and LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d

     

    The start conditions for each job looks like this: (there are NO look backs in the condition statements)

     

    LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d

    START CONDITIONS: (all "and")

    Success from LRST-dist-dupes-passed-reject-load-jsb-00d

    Not Running  LRST-dist-reptmart-mc-clearing-fact01-load-etl-00d

    Not Running LRST-dist-reptmart-visa-clearing-fact01-load-etl-00d

    Not Running LRST-dist-reptmart-setlmt-dep01-dyn-load-etl-00t

    Not Running LRST-dist-reptmart-wrapup-clearing-fact01-load-etl-00d

     

     

    LRST-dist-reptmart-wrapup-clearing-fact01-load-etl-00d

    START CONDITIONS: (all "and")

    Success from LRST-dist-deposit-requalify-jsb-00d

    Not Running LRST-dist-reptmart-mc-clearing-fact01-load-etl-00d 

    Not Running LRST-dist-reptmart-visa-clearing-fact01-load-etl-00d

    Not Running LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d

    Not Running LRST-dist-reptmart-setlmt-dep01-dyn-load-etl-00t

     

    However, once the success conditions are met, the jobs run like this:

     

    LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d ->starts

    LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d ->ends

    check conditions on LRST-dist-reptmart-wrapup-clearing-fact01-load-etl-00d à conditions == true

     

    conditions met -> run...

    LRST-dist-reptmart-wrapup-clearing-fact01-load-etl-00d->starts

    LRST-dist-reptmart-wrapup-clearing-fact01-load-etl-00d ->ends

    check conditions on LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d à conditions == true

     

    conditions met -> run...

    LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d ->starts

    LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d ->ends

     

    then the cycle repeats over and over.

          

    What would you suggest to fix this problem?



  • 2.  Re: Using notrunning condition causes a loop

    Posted Dec 20, 2017 09:37 PM

    You might want to add a look-back to the success() condition.

    For example:

    Job: LRST-dist-reptmart-wrapup-clearing-fact01-load-etl-00d

    condition: S(LRST-dist-deposit-requalify-jsb-00d,0) & N(LRST-dist-reptmart-mc-clearing-fact01-load-etl-00d) ...



  • 3.  Re: Using notrunning condition causes a loop

    Posted Dec 22, 2017 04:44 PM

    Thank you. This solved my issue. A simple fix is always best.



  • 4.  Re: Using notrunning condition causes a loop

    Broadcom Employee
    Posted Dec 20, 2017 10:52 PM

    Keep in mind that whenever the jobs in the condition statements change state to match the condition they trigger the dependent job to run. So when LRST-dist-reptmart-wrapup-clearing-fact01-load-etl-00d finishes it triggers LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d and vice versa.  As Chandru suggests a look back should fix it.



  • 5.  Re: Using notrunning condition causes a loop

    Broadcom Employee
    Posted Dec 21, 2017 12:36 AM

    If the look back on the success job does not suit you, try putting the LRST-dist-reptmart-setlmt-dep01-static-load-etl-00d and LRST-dist-reptmart-wrapup-clearing-fact01-load-etl-00d jobs into separate boxes (the dependency can still point to the jobs).  This will break the loop and these 2 jobs will not run without a starting event. eg start the box



  • 6.  Re: Using notrunning condition causes a loop

    Posted Dec 22, 2017 04:45 PM

    Thanks for the input!



  • 7.  Re: Using notrunning condition causes a loop

    Broadcom Employee
    Posted Dec 21, 2017 10:44 AM

    Another option is to use a virtual resource to serialize the jobs. You could create a renewable resource that has 1 unit. Each job would be defined to require 1 unit. When the jobs conditions are satisfied, one of the jobs will be started and hold the resource unit. The other job, if ready to start, would go into a RESWAIT state until the job consuming the resource completed.



  • 8.  Re: Using notrunning condition causes a loop

    Posted Dec 22, 2017 04:45 PM

    Thanks for your input. I'll need to keep this solution in mind.