Automic Workload Automation

  • 1.  How to make Automic recognize a .net program with an unhandled exception as a failure

    Posted Jul 31, 2018 03:22 PM

    Hello,

     

    My shop converted from CA ESP to CA Automic. 

     

    I have a job set up to execute a ".net" program .

     

    When running this job in ESP,

    if the program completed successfully, it would send a return code 0 back to ESP.

    If the program completed with an unhandled exception, no return code would be sent, but ESP would mark the job as failed. 

     

    This was accomplished by adding ESP parameter EXITCODE to the job statement below https://docops.ca.com/ca-workload-automation-esp-edition/11-4/en/reference/statements/exitcode-statement-identify-success-or-failure-by-exit-code

    NT_JOB EXEJOB.AWSMOPDM
        AGENT AEBPAS-BATCH01
        CMDNAME c:\mopconsole\Parallelconsole.exe
        ARGS PROD
       RUN WORKDAYS
       IF DAYS_FROM('NOV 4,2017') GE 0 AND DAYS_TO('DEC 20,2017') GE 0   THEN RUN SAT
       NORUN HOLIDAY
        EXITCODE 0 SUCCESS
       RELEASE (COP566D1.AWSMOPDM)
     ENDJOB

     

    In Automic, I have a JOBS object set up to execute the .net program, but I'm having issues with making Automic fail the job if  the program ends with an unhandled exception. 

     

    Any ideas on what I need to do to have Automic mark the job as failed when the program has an unhandled exception?



  • 2.  Re: How to make Automic recognize a .net program with an unhandled exception as a failure

    Broadcom Employee
    Posted Aug 01, 2018 11:59 AM

    Does the job report contain the unhandled exception error? If it does you can scan the report using PREP_PROCESS_REPORT or using a filter object.



  • 3.  Re: How to make Automic recognize a .net program with an unhandled exception as a failure

    Posted Aug 01, 2018 02:01 PM

    We use the output filter object solution.  Ours checks for report literals that are only written if the solution ran successfully.



  • 4.  Re: How to make Automic recognize a .net program with an unhandled exception as a failure
    Best Answer

    Broadcom Employee
    Posted Aug 06, 2018 10:06 AM

    Hi,

    Here is a more detailed list of steps to achieve your goal:
       1. Create a Output Filter
       2. Under 'Report' section add the following:
    Report(REP)-Contains-Unhandled error Could not find file
       3. Add and save
       4. Open Job object
       5. Click Output> Output-Scan
       6. Define the filter object you created in steps 1-3
       7. Set Return Code to 1

     

    With that in place the job should get a return code of 1 if that message is in the job report.



  • 5.  Re: How to make Automic recognize a .net program with an unhandled exception as a failure

    Posted Aug 06, 2018 10:12 AM

    Thanks Ian and Pete!

     

    Thanks Ian for the example!

     

    This will be helpful to other new customers to Automic!