Use GET_PARENT_* and GET_OBJECT_* scripting statements to get the parent of the parent of the escalated notification. If I have a job that fails and I have it send me a notification which, if not accepted or rejected after 5 minutes sends an escalation notification, I would use the following (Please note, there was an error with the STATE and RETCODE lines below before upgrading to hotfix 8.00A105-301 for Automation Engine and Database):
!Get parent run number:
:set &parentnr# = SYS_ACT_PARENT_NR('ACT')
:P "Parent number (number of CALL.NOTIFICATION) is &parentnr#"
!Get Name of the parent of Parent number
:SET &UC_CAUSE_NAME# = GET_PARENT_NAME(&parentnr#, 'ACT')
:P "Parent name of CALL.NOTIFICATION is &UC_CAUSE_NAME#"
!Get the run number of the parent of Parent number
:SET &UC_CAUSE_NR# = GET_PARENT_NR(&parentnr#, 'ACT')
:P "Run number of &UC_CAUSE_NAME# = &UC_CAUSE_NR#"
!Get Object type of UC_CAUSE_NAME
:SET &OBJECT_TYPE# = GET_OBJECT_TYPE(&UC_CAUSE_NAME#)
:P "&UC_CAUSE_NAME# is a &OBJECT_TYPE# object."
!Get the Status of UC_CAUSE_NR
:SET &UC_CAUSE_STATE# = GET_UC_OBJECT_STATUS(&OBJECT_TYPE#,&UC_CAUSE_NR#,"STATUS")
:P "The status of &UC_CAUSE_NAME# (Run number &UC_CAUSE_NR#) is &UC_CAUSE_STATE#"
!Get the retcode of UC_CAUSE_NR
:SET &UC_CAUSE_RETCODE# = GET_UC_OBJECT_STATUS(&OBJECT_TYPE#,&UC_CAUSE_NR#,"RETCODE")
:P "The retcode of &UC_CAUSE_NAME# (Run number &UC_CAUSE_NR#) is &UC_CAUSE_RETCODE#"