ESP dSeries Workload Automation

 View Only
  • 1.  Auto force complete failed generation/job

    Posted Nov 17, 2023 01:47 PM

    Condition - When the next generation or job is completed, In this case, the failed generation should be forced to complete. 

    Please advise the solution to it. 

    dSeries 12.3 version 



  • 2.  RE: Auto force complete failed generation/job

    Broadcom Employee
    Posted Nov 20, 2023 05:59 AM

    Hi,

    If you want any application generation that is failed to be completed. You can add a job at the end of the application . It can create alert that can force complete the application with generation -1 using execcommand javascript.

    Please see the execcommand syntax here - 

    https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/ca-workload-automation-de/12-4/scheduling/using-javascript/built-in-functions/job-subapplication-and-application-control-javascript-function.html




  • 3.  RE: Auto force complete failed generation/job

    Posted Nov 21, 2023 01:25 PM

    Hello Ravi,

    Thanks for sharing the solution to our query. However, we need the previous failed generations to be force-completed only once the latest generation is completed successfully.




  • 4.  RE: Auto force complete failed generation/job

    Broadcom Employee
    Posted Nov 22, 2023 12:39 AM


    Yes, this new job like a link job should be the last job in the application. So all other jobs are completed then only this new job will start and it will force complete the previous generation.

    Hope I am able to clarify it.




  • 5.  RE: Auto force complete failed generation/job

    Broadcom Employee
    Posted Nov 22, 2023 04:48 AM
    Edited by Rajagopal Tadavarthy Nov 22, 2023 04:49 AM

    hi,

    You can try a JavaScript defined in a job with  either to complete the previous generation application or previous generation failed job to force complete.

    var a = parseInt(APPL._gen);
    var b = a -1;
    execCommand('TASK0', 'VERIFY.%(b)', 'ACTION COMPLETE Reason("complete to run the next job")');
    (or)
    execCommand('ALL','VERIFY.%(b)', 'ACTION COMPLETE');

    execCommand('ALL','VERIFY.%(b)', 'ACTION COMPLETE');  ----- This command will Force Complete all the Jobs of last generation of VERIFY application.

    execCommand('TASK0', 'VERIFY.%(b)', 'ACTION COMPLETE Reason("complete to run the next job")');  ---- This Command will force complete TASK0 job of VERIFY application of last generation of Application. 

    Thanks,

    Rajagopal




  • 6.  RE: Auto force complete failed generation/job

    Posted Nov 26, 2023 03:41 PM

    Hello,

    Thanks for the solution provided, we have tried but didn't fulfill the requirements (i.e. It does not mark the older generation force complete after its current generation got completed successfully).

    We tried to put the given javascript at the application and job level but no luck.

    Could you please assist us with this concern?




  • 7.  RE: Auto force complete failed generation/job

    Broadcom Employee
    Posted Nov 27, 2023 01:31 AM

    Ok. We will need to know why this did not work at your end by looking at logs and what you did. I will suggest that you raise a ticket for this with the support.




  • 8.  RE: Auto force complete failed generation/job

    Posted Nov 28, 2023 07:40 AM

    Faiz how many generations of failed Applications/jobs are there before you have one that completes successfully? Why would you only try and force the failed Applications complete once you get a good execution in later generations?

    The solution you are looking for might be different depending on your answer. If you have a failed Application, yet you allow other generations of the same Application/Jobs trigger in, you might just want to put a COMPLETE All Link into every Application with a time delay or something to assure you have time to allow all jobs to complete successfully. I assume you have built in notifications for failure etc. to know a job failed? 



    ------------------------------
    DARDEN Corporation
    Orlando, FL
    ------------------------------