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​
Original Message:
Sent: 08-13-2019 01:06 PM
From: Sorgalla
Subject: Skip JOBP when any JOB fails
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
Original Message:
Sent: 08-09-2019 01:42 AM
From: Sorgalla
Subject: Skip JOBP when any JOB fails
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.