Automic Workload Automation

 View Only
  • 1.  Skip JOBP when any JOB fails

    Posted Aug 09, 2019 10:33 AM
    Hi,

    following requirement: We have a JOBP containing 5 JOBPs, which in turn contain JOBs. This Top-JOBP will run every day in Prod. But if a JOB in any of the 5 Sub-JOBPs fails, it blocks the Sub-JOBP.  
    However, we still want all subsequent workflows to run afterwards. Operations team will then look into the failed SubJOBP the next morning and reprocesses it manually. 

    Any suggestions? 
    I was thinking about e.g. setting a task to Ended_Empty if it fails (which is tricky cause StopNoMsg does not work in PostProcess), or set EndedNotOk but still proceed?
    I don't know about the most elegant way.


  • 2.  RE: Skip JOBP when any JOB fails

    Posted Aug 09, 2019 12:55 PM
    If I understand correctly, you want processing to continue even if a failure occurs.

    This is typically accomplished by going into the task properties of the object that needs to "continue upon failure", and relax its dependency rules.  You will quite likely find a dependency rule setting of "ANY_OK/else/ Block".   You can replace this ANY_OK rule with blanks, and then the task will continue no matter what state the dependency finishes in.

    ------------------------------
    Pete (AE V11.2)
    ------------------------------



  • 3.  RE: Skip JOBP when any JOB fails

    Posted Aug 09, 2019 01:25 PM
    Hi Pete,
    thanks for the reply. Good hint, I will try that.
    Regarding the state after failure I want it to be working as follows: Task in SubJOBP fails. Then the subsequent tasks either run or fail. Would need to check the requirement. 
    What I want for sure though is, that the SubJOBP task shows as some form of failed in the TopJOBP. That way Operations Team directly sees in their morning checks, that something failed. This SubJOBP may not show as EndedOK. You think this is covered with your approach? Will log in tomorrow and see if that's a solution. 
    Yeah the more I'm thinking about it, I think the solution really is to remove the blocking state.

    ------------------------------
    Software Engineering Analyst
    Accenture Technology Solutions
    ------------------------------



  • 4.  RE: Skip JOBP when any JOB fails

    Posted Aug 09, 2019 01:32 PM
    I think the product will leave the EndedOK JOBP in the activity window for followup the next day.  We have systems that do this too.

    ------------------------------
    Pete (AE V11.2)
    ------------------------------



  • 5.  RE: Skip JOBP when any JOB fails

    Posted Aug 09, 2019 01:35 PM
    Something else to be aware of regarding workflow completion state behaviors;

    Say JOBP1 invokes JOBP2 invokes JOBP3.

    If JOBP3 finishes EndedNotOK, this will be reflected in JOBP2, but *NOT* in JOBP1.

    ------------------------------
    Pete (AE V11.2)
    ------------------------------



  • 6.  RE: Skip JOBP when any JOB fails

    Posted Aug 13, 2019 01:34 AM
    Hi Pete,

    "You can replace this ANY_OK rule with blanks, and then the task will continue no matter what state the dependency finishes in"

    This is working in most cases. What I saw now is, that this does not work if the predecessor is blocked. But that's what I want. Do you have an idea?

    So, my wish is the following: If a task fails, it gets blocked. So operations can restart from there the next morning. The workflow then gets blocked as well in the top workflow. However, there the next workflow should start anyway. So far I could not get this to work. Seems like blocked is a not ended state that does not send any status to the successor 😔


    ------------------------------
    Software Engineering Analyst
    Accenture Technology Solutions
    ------------------------------



  • 7.  RE: Skip JOBP when any JOB fails
    Best Answer

    Posted Aug 13, 2019 01:06 PM
    Seems like I have found a solution. Actually very simple. Tasks in the sub-workflows are now set to „block and send abort signal to parent" in the time & dependencies tab of the task properties. 
    Now the sub-workflows in the top-workflow have the status endedNotOk. Then the next sub-wf can start. And the failed wf is still blocked and can be restarted from the failed task 🙂

    ------------------------------
    Software Engineering Analyst
    Accenture Technology Solutions
    ------------------------------



  • 8.  RE: Skip JOBP when any JOB fails

    Posted Aug 14, 2019 02:16 PM
    You can use below script to unblock the object based on the return code. You can call this script from the post processing of the block object. Hope this helps.
    --------------------------
    :PRINT 'OBJECT NAME IS : &UNBLK_OBJ_NAME#'
    :SET &RUNID# = GET_STATISTIC_DETAIL(,RUNID,&UNBLK_OBJ_NAME#)
    :SET &PARENTID# = GET_STATISTIC_DETAIL(&RUNID#,PARENT_ACT)
    :SET &PARENT#  = GET_STATISTIC_DETAIL(&PARENTID#,NAME)
    :PRINT 'OBJECT RUNID IS : &RUNID#'
    :PRINT 'PARENT RUNID IS : &PARENTID#'
    :PRINT 'PARENT NAME IS : &PARENT#'
    :SET &RET# = MODIFY_UC_OBJECT (&PARENTID#,RELEASE,&RUNID#)

    ! This is to notify the Batch operations team that the unblock action was not successful

    :IF &RET# = "0"
    :   PRINT 'Task &UNBLK_OBJ_NAME# with Runid &RUNID# in WF &PARENT# with runid &PARENTID# unblocked successfully'
    :ELSE
    :   SET &MESSAGE# = 'Unblock task failed.'
    :   SET &BOPS_EMAIL# = GET_VAR(VARA.EMAILS,'BPO_RPT',1)
    :   SET &RET# = SEND_MAIL(&BOPS_EMAIL#,,&MESSAGE#, "Unblock task for &UNBLK_OBJ_NAME# with Runid &RUNID# in WF &PARENT# with runid &PARENTID# failed. Please check. Thank you!")
    :ENDIF​



  • 9.  RE: Skip JOBP when any JOB fails

    Posted Aug 15, 2019 03:11 PM

    Great. Yes, you can do multiple ways. Depends up on what do you want :)