How to locate Workflow when Notification is Activated by Task

Document ID : KB000117652
Last Modified Date : 16/10/2018
Show Technical Document Details
Introduction:
A notification object is set at the Job level, where it gets activated when the Job fails.
The Job (or Task) is placed inside a Workflow.

How to retrieve the Workflow's name when the Notification is set at the Job (or Task) level?
Instructions:
1. The Notification is activated by the Task (Job) = Activator 
2. The Task is activated by the Workflow = Parent 
How to connect the Notification to the Parent of the Task? 

:set &notify_runID# = &$RUNID# 
:p "notification runID: &notify_runID#" 
:set &task_name# = GET_PARENT_NAME(&notify_runID#,'Act') 
:p "activator name: &task_name#" 

:set &wf_tasknr# = GET_PARENT_NR(&$ACTIVATOR_RUNID#) 
:p "parent runID: &wf_tasknr#" 
:set &wf_name# = GET_PARENT_NAME(&$ACTIVATOR_RUNID#) 
!:set &wf_name# = GET_PARENT_NAME(&UC_CAUSE_NR) <-- ALTERNATE ANSWER 
:p "parent name: &wf_name#"