Automic Workload Automation

 View Only
  • 1.  Is it possible to change "STATUS" text?

    Posted Apr 07, 2020 01:41 PM
    This might be a rudimentary question I'm posting here, so please forgive me but - 

    I've got a JOBP that runs and the job within it is set up using PREP_PROCESS_REPORT so that, if it finds that the job reports has the text string "Processing", it does MODIFY_STATE and changes the return code to "999". 

    Then on the Postconditions of the job in the JOBP, if it finds that the return code is "999", it waits X minutes then reruns itself until it finds "Completed" in the job. 

    My problem is that every time the job is waiting to rerun itself, it leave an error in Process Monitoring, until it completes successfully and cleans itself up. 

    I need to resolve this. I've played around with the "Automatic Deactivation" on the Attributes tab of the job, but that's not it. 

    I'm wondering if I can change the "STATUS" of the job so that it says something like "WAITING for rerun". 

    In the Postconditions, you can change the status textbut that only changes it if you select "Details" under "Executions". My preference is to see it waiting to be rerun when you look at just the Executions of the job. 

    I looked at MODIFY_TASK, but I don't think that's correct. 

    Does any one know if it is possible to change the STATUS TEXT so that it can be viewed without opening up the Details pane? 



  • 2.  RE: Is it possible to change "STATUS" text?

    Posted Apr 07, 2020 06:36 PM
    My understanding is we can't apply custom status texts.  The status text is a reflection of what the status code has been set to.  I think you may be able to change the status code to a different one, but it has to be in the available list;
    https://docs.automic.com/documentation/webhelp/english/ALL/components/AE/11/All%20Guides/Content/ucaaiy.htm

    But I wonder if populating the ArchiveKey1 or ArchiveKey2 columns might be sufficent?  These columns can be displayed from "Process Monitoring" as well.

    ------------------------------
    Pete
    ------------------------------



  • 3.  RE: Is it possible to change "STATUS" text?

    Posted Apr 09, 2020 09:07 AM
    Thanks, @Pete Wirfs​! I appreciate your input! I'll check out the ArchiveKey option or test the system return codes. 

    At the very least, I'll have to prompt everyone to keep the "Details" pane open and monitor recurring failures for the "Status text" field.


  • 4.  RE: Is it possible to change "STATUS" text?

    Posted Apr 08, 2020 03:43 AM
    Edited by Carsten Schmitz Apr 08, 2020 03:46 AM

    edit: nevermind, probably missed the point.



    Hi.

    MODIFY_STATE does not set the Automic code, it "fakes" a different return code, which would normally be zero for a successful execution of a job, with anything greater zero indicating failure.

    My hunch: By setting it to 999, you are telling Automic that the job has failed. You need to tell Automic that 999 is an acceptable return code that denotes success. There's a dialog field in the "runtime" tab to tell it to consider anything below certain codes as "success". I guess setting that to 1000 would solve the issue.

    Hth,

    ------------------------------
    These contain very good advise on asking questions and describing supposed bugs (no, you do not need to go to StackExchange for Automic questions, but yes, the parts on asking detailed, useful questions ARE usually relevant):

    http://www.catb.org/~esr/faqs/smart-questions.html

    https://www.chiark.greenend.org.uk/~sgtatham/bugs.html

    I will not respond to PM asking for help unless there's an actual reason to keep the discussion off of the public forums.
    ------------------------------



  • 5.  RE: Is it possible to change "STATUS" text?

    Posted Apr 09, 2020 09:03 AM

    It's a REST job and always returns as "RESTful job complete", which is seen as ENDED_OK, but the job report will also state that it is "Processing". So, I MODIFY_STATE to 999, then rerun it in X minutes on the Postconditions on the job within the workflow until it finds "Complete" in the job report. 

    I also must pass the parent runId to the GET job to obtain the status from the previous POST job, which both run within the same parent workflow. 

    It's a little clunky, but it works. I just have to try to figure out how to keep the '999' failures from showing up in "Process Monitoring' or, once I get out of UAT and move to production, and transfer monitoring to our Operators, I'm going to get a ton of phone calls in the middle of the night! 

    Thanks for your input!




  • 6.  RE: Is it possible to change "STATUS" text?

    Posted Apr 08, 2020 03:54 AM
    Edited by Bernhard Flegel Apr 08, 2020 03:57 AM
    Hi Michele,

    I don't know if I understood you right... I assume that your job is running correctly (returncode=0) and in the post-script it changed to 999 via "modify_state"... thats what you want to avoid.

    There is a possibility to not change the returncode and rerun the job. Set a variable via :pset and check this variable in the post-conditions.

    Post-script example:

    !Indicator-variable for the post-condition
    :pset &indicator# = 0
    !
    :set &hnd# = prep_process_report(,,,"Processing...",,)
    :process &hnd#
    : modify_state STATUS_TEXT = "Not completed"
    : pset &indicator# = 1
    :endprocess

    Your post-condition should be:




    ------------------------------
    Landeshauptstadt München
    ------------------------------



  • 7.  RE: Is it possible to change "STATUS" text?
    Best Answer

    Posted Apr 08, 2020 05:20 AM
    Hi Michele,

    as @Pete Wirfs already wrote: It is not possible to apply custom status text which can be viewed without opening up the details. The archive keys can be workaround.

    If you want to keep your Process Monitoring view clean you can try to add the following into the Pre-Script of your job:

    :SET &RUNID_OLDEST# = GET_UC_OBJECT_NR(&$NAME#)
    :IF &RUNID_OLDEST# <> &$RESTART_RUNID#
    :  SET &DEACTJOB# = DEACTIVATE_UC_OBJECT(&RUNID_OLDEST#,FORCED)
    :ENDIF​

    This script looks for the oldest RunID and deactivates it. I just did a quick test. So please test carefully.

    Good luck,

    Tim





    ------------------------------
    Automation Evangelist
    Fiducia & GAD IT AG
    ---
    Mitglied des deutschsprachigen Automic-Anwendervereins FOKUS e.V.
    Member of the German speaking Automic user association FOKUS e.V.
    ------------------------------



  • 8.  RE: Is it possible to change "STATUS" text?

    Posted Apr 09, 2020 08:56 AM
    Thanks, @Tim Quakulinsky. I'll give that a try! ​


  • 9.  RE: Is it possible to change "STATUS" text?

    Posted Apr 10, 2020 10:46 AM
    Hi Michele,
    Just my simple minded opinion here, no offense intended to customers or Automic.

    Here is another good example of AE providing too much functionality, it allows you to setup 2 checks of a completed process, which then displays undesired status, when if you use just the status check/wait/rerun option, it displays what you need. The sort of circular functionality is all over AE and although it provides a high level of versatility, it also can give undesired results. I always recommend people approach the functionality with a "Less is more" rule and be aware that AE will let you logic yourself into a corner.

    ------------------------------
    Founder and Partner
    Data Center Automation Consultants DCAC
    ------------------------------