Automic Workload Automation

 View Only
  • 1.  Changing an Object's Status Based on Conditions

    Posted Jul 01, 2014 12:52 PM

    Very simple question, I am curious if there is a function for changing an object's status (e.g. from ENDED_OK to ENDED_NOT_OK) within the post process tab of that object. For example, when executing tasks in another MFT tool (Cleo) by inserting the command in the process tab of a Job, a File not Found can occur. In Automic, there is a warning in the Last Report saying no file was found, but still returns 0 for the return code. I am wondering if, after processing the Job report using PREP_PROCESS_REPORT, is there a way to tell Automic "Hey, there was a File Not Found message in this object, I would like to set the end status to ENDED_NOT_OK instead of ENDED_OK." I am not sure if, since the object has already ran and a report has been created, it is too late to change the objects end status or not. I know it is possible to use the MODIFY_STATE function to change the status TEXT, but not the actual status.

    Thank you in advance for your help!

    - Matt Woelfel



  • 2.  Changing an Object's Status Based on Conditions
    Best Answer

    Posted Jul 01, 2014 01:06 PM

    Please reread the help for the MODIFY_STATE statement.  Changing the RETCODE can do exactly what you are requesting (unless I'm misunderstanding).

    . . .  clip from V8 help

    Modifying the return code influences the status of a Job. The status results from the maximum return code that has been defined for a normal job end ("Runtime" tab). If the modified return code is higher than the specified maximal return code, the status is set to ENDED_NOT_OK. If the modified return code is lower than or equal to the specified maximum return code, the Job ends on the status ENDED_OK.

    . . . clip




  • 3.  Changing an Object's Status Based on Conditions

    Posted Jul 01, 2014 01:24 PM

    I must have glanced over that! Thank you for the help



  • 4.  Changing an Object's Status Based on Conditions

    Posted Jul 03, 2014 02:31 PM
    Also note, if you change the RC with a post-condition (instead of UC4 script like above), it will be too late to suppress any alerts you have coming from the Runtime RC field (because those are executed before the post-conditions are evaluated).

    Just a little gripe if anyone's listening: setting RC to zero is actually kind of an annoying, because you lose the original return code and any database record of it. AppWorx's "set finished status" was better in that area.




  • 5.  Changing an Object's Status Based on Conditions

    Posted Jul 07, 2014 02:03 AM

    The status cannot be changed from any post process mechanism and as I know there are no plans to do so. The only way - as already mentioned - is to change the return code via the PostProcess or PostCondition tab



  • 6.  Changing an Object's Status Based on Conditions

    Posted Jul 07, 2014 10:58 AM

    We have on occasion, stored the original status as a Comment using the ADD_COMMENT function.  It is then available for subsequent use via a Statistics search with "Show commented executions only".  We have also used the PREP_PROCESS_COMMENTS function to search and parse out the original status. Sometimes we PRINT the original status as we change it and then use the PREP_PROCESS_REPORT, with a report type of POST, function to locate it later on.  

    None of these techniques are ideal and if I were voting I'd like something as described by Jessica.  This is not something that we routinely do, but some type of enhancement would be nice. 

    Perhaps a product idea is in order.