Friday, November 4, 2016

How to check Open Workflow Notification from backend and how to Approve/Reject.


select  wn.notification_id nid,
wn.context,
wn.group_id,
wn.status,
wn.mail_status,
wn.message_type,
wn.message_name,
wn.access_key,
wn.priority,
wn.begin_date,
wn.end_date,
wn.due_date,
wn.callback,
wn.recipient_role,
wn.responder,
wn.original_recipient,
wn.from_user,
wn.to_user,
wn.subject
from    wf_notifications wn, wf_item_activity_statuses wias
where  wn.group_id = wias.notification_id
and  wias.item_type = ‘XXRECNQM’
and  wias.item_key like ‘XXRECNQM%’;


BEGIN
wf_notification.setattrtext(nid => ‘NOTIFICATION_ID’,aname => ‘RESULT’,avalue =>  ‘REJECTED/APPROVED’ );
wf_notification.respond(nid => ‘NOTIFICATION_ID’,respond_comment => ‘Reject from Backend’,responder =>  ‘USER_NAME/RESPONDER_NAME’ );
Commit;
END;
——————————————————-

Close FYI Notification
BEGIN
wf_notification.close(NOTIFICATION_ID,’SYSADMIN’);
END;


1 comment: