ESP Workload Automation

Expand all | Collapse all

Depletable Resources

  • 1.  Depletable Resources

    Posted May 03, 2013 10:54 AM
    I have an issue with the Depletable resources.
    I have 3 jobs running in 2 different applications . JOB B in APPL A should run only after JOB A and JOB C completes. So I defined a Enterprise Depletable resource with AVAIL(4)
    BUt the issue that I am having is even after JOB A and JOB C completes and depletes the resource, JOB B does not start executing.
    I checked the resource after the compelion of JOB A and JOB C, the resource AVAIL count is 0. Can someone please help me with this ?

    APPL A

    JOB A
    RESOURCE ADD(1,RES_AB)
    RUN NOW
    RELEASE ADD(B)
    ENDJOB

    JOB B
    RESOURCE ADD(^RES_AB)
    RUN NOW
    ENDJOB

    APPL C

    JOB C
    RESOURCE ADD(1,RES_AB)
    RUN NOW
    ENDJOB


    Regards,
    Amit Kumar


  • 2.  RE: Depletable Resources

    Broadcom Employee
    Posted May 04, 2013 06:03 AM
    Hello Amit,

    resource name ^RES_AB is not in allowed format and I am not aware that this would mean negation. You might consider using an EXTERNAL job for your scenario. Just remove all the resources from your job definitions and add into application A this job:

    JOB C EXTERNAL APPLID(C)
    RUN NOW
    RELEASE ADD(B)
    ENDJOB

    The external job C will be completed only when job C in application C is completed. Than it will release job B. Please see JOB parameters SCOPE and SCHEDULED for situations when the job C in application C ends before application A is generated.

    Kind regards, petr


  • 3.  RE: Depletable Resources

    Posted May 07, 2013 04:28 AM
    Hi Amit,

    I agree with Petr - an External job is much the better solution here.

    Regards,
    John


  • 4.  RE: Depletable Resources

    Posted May 07, 2013 08:11 AM
    John/Peter,

    I Should have probably included this before. Applications runs multiple times a day, that's why I used the resources.


  • 5.  RE: Depletable Resources

    Broadcom Employee
    Posted May 07, 2013 09:33 AM
    Hi

    An important difforance between RESOUCES and EXPERNALS. An EXTERNAL will only be satisfied when the JOB has successfully completed. A RESOUSE is satisfied when the job finishes, this being completed or failed.

    Richard


  • 6.  RE: Depletable Resources

    Posted May 07, 2013 09:41 AM
    Richard,

    That is correct, But if I define the RESOURCE with a HOLD Keyword on it, the resource will be held until the job completes succesfully.

    But the problem that i am having here is the Depletable Resources not working properly. The ^RES_AB resource must allow the job to run, when the INVERT condition is satisfied and the Scratch Count becomes zero.


  • 7.  RE: Depletable Resources

    Broadcom Employee
    Posted May 07, 2013 11:08 AM
    Hi

    About your example

    JOB B
    RESOURCE ADD(^RES_AB)
    RUN NOW
    ENDJOB



    Are you coding ^RES_AB or ¬RES_AB

    The little hat symbol ( ^ ) does not work, the not symbol ( ¬ )will look for a 0 resource. Can you double check this it may be a cut/paste issue and translation.

    Richard


  • 8.  RE: Depletable Resources
    Best Answer

    Posted May 07, 2013 09:53 AM
    Maybe try something like this.
    Sherri


    APPL A

    JOB SET.JOBA TASK SELFCOMPLETING
    RUN REF JOBA
    ESPNOMSG RESDEF JOBA_DONE SET AVAIL(0)
    RELEASE ADD(JOBA)
    ENDJOB

    JOB RESET.JOBA TASK SELFCOMPLETING
    RUN REF JOBA
    ESPNOMSG RESDEF JOBA_DONE SET AVAIL(1)
    AFTER ADD(JOBA)
    ENDJOB

    JOB A
    RUN NOW
    ENDJOB

    JOB B
    RESOURCE ADD(JOBA_DONE)
    RESOURCE ADD(JOBC_DONE)
    RUN NOW
    ENDJOB

    APPL C
    JOB SET.JOBC TASK SELFCOMPLETING
    RUN REF JOBC
    ESPNOMSG RESDEF JOBC_DONE SET AVAIL(0)
    RELEASE ADD(JOBC)
    ENDJOB

    JOB RESET.JOBC TASK SELFCOMPLETING
    RUN REF JOBC
    ESPNOMSG RESDEF JOBC_DONE SET AVAIL(1)
    AFTER ADD(JOBC)
    ENDJOB

    JOB C
    RUN NOW
    ENDJOB


  • 9.  RE: Depletable Resources

    Posted May 07, 2013 10:01 AM
    OOPS!!!!
    This should be

    JOB B
    RESOURCE ADD(1,JOBA_DONE)
    RESOURCE ADD(1,JOBC_DONE)
    RUN NOW
    ENDJOB


  • 10.  RE: Depletable Resources

    Posted May 07, 2013 10:28 AM
    Sherri,

    This will work in the case if APPL C comes in before APPL A . But if APPL A gets triggered in first, then JOB B will start executing since the resource JOBC_DONE was set to 1 from its previous run.

    Regards,
    Amit


  • 11.  RE: Depletable Resources

    Posted May 07, 2013 10:45 AM
    True...
    what if you reset the resource back to 0 after JOB B finishes? See below

    APPL A

    JOB A
    RUN NOW
    ENDJOB

    JOB RESET.JOBA TASK SELFCOMPLETING
    RUN REF JOBA
    ESPNOMSG RESDEF JOBA_DONE SET AVAIL(1)
    AFTER ADD(JOBA)
    ENDJOB


    JOB B
    RESOURCE ADD(1,JOBA_DONE)
    RESOURCE ADD(1,JOBC_DONE)
    RUN NOW
    ENDJOB

    JOB SET.JOBA TASK SELFCOMPLETING
    RUN NOW
    ESPNOMSG RESDEF JOBA_DONE SET AVAIL(0)
    AFTER ADD(JOBB)
    ENDJOB

    JOB SET.JOBC TASK SELFCOMPLETING
    RUN NOW
    ESPNOMSG RESDEF JOBC_DONE SET AVAIL(0)
    AFTER ADD(JOBB)
    ENDJOB


    APPL C

    JOB C
    RUN NOW
    ENDJOB

    JOB RESET.JOBC TASK SELFCOMPLETING
    RUN REF JOBC
    ESPNOMSG RESDEF JOBC_DONE SET AVAIL(1)
    AFTER ADD(JOBC)
    ENDJOB


  • 12.  RE: Depletable Resources

    Posted May 07, 2013 10:53 AM
    Sherri,

    That works great for me.

    But, I still would like to know why are the depletable resources not working the way it is supposed to . I will raise a ticket with CA for that.

    Thanks again, Sherri. Appreciate your help.


  • 13.  RE: Depletable Resources

    Posted May 07, 2013 10:56 AM
    You are welcome! :smile