List notifications with unresolved recipient tokens
For Demand and Deliver email notifications
these field associations exist between these tables:
KNTA_NOTIFICATIONS KWFL_WORKFLOW_STEPS
condition_value --> workflow__step_id
event_value --> status
select ww.workflow_name,
wws.sort_order "Step#", wws.step_name,
nn.visible_event_value, nn.description,
nnr.email_address, nnr.token, nnr.recipient_type_code
from KWFL_WORKFLOWS ww,
KWFL_WORKFLOW_STEPS wws,
KNTA_NOTIFICATIONS nn,
KNTA_NOTIFICATION_RECIPIENTS nnr
where ww.workflow_id = wws.workflow_id
and nn.condition_value = wws.workflow_step_id
and nn.notification_id = nnr.notification_id
and ww.enabled_flag = 'Y'
and nn.enabled_flag = 'Y'
and wws.enabled_flag = 'Y'
and ( nnr.token like '%_EMAIL%' or
nnr.email_address like '%_EMAIL%'
)
order by nnr.email_address, ww.workflow_name,
wws.sort_order, nnr.token, ww.workflow_name asc
|