Notifications From Oracle Workflows
Notifications From Oracle Workflows
com/apps/workflows/373-workflow-notification-sender-email-address
Page 1 of 6
http://apps2fusion.com/apps/workflows/373-workflow-notification-sender-email-address
In this example, the email from workflow notification will look as shown below.
Notice that sender is specific to our business requirement.
To replicate this test case on your eBusiness Suite environment is two step process.
Step 1. Right click to Save this workflow on your file system. Then open this wft file in WF Builder and save to
Database.
http://www.apps2fusion.com/training_demo/anilpassi/wf_override_sender/XXTEST.wft
Note- this workflow will send notification to SYSADMIN from desired email address.
Step 2. Run the below SQL to kick off this workflow and set the special attributes.
Within 3 minutes the email should be sent out by notification mailer.
DECLARE
l_itemkey VARCHAR2(100);
v_role_name VARCHAR2(100) := 'Anil Passi Testing';
v_role_email VARCHAR2(100) := '[email protected]';
n_count_role INTEGER := 0;
BEGIN
SELECT COUNT(*)
INTO n_count_role
FROM wf_local_roles
WHERE NAME = v_role_name;
IF n_count_role = 0
THEN
--If the sender does not exist in WF Local Roles, then create one on the fly
wf_directory.createadhocrole(role_name
=> v_role_name
,role_display_name
=> v_role_name
,role_description
=> v_role_name
,notification_preference => 'MAILHTML'
,email_address
=> v_role_email
,status
=> 'ACTIVE'
,expiration_date
=> NULL);
dbms_output.put_line('Ad Hoc Role Created');
ELSE
dbms_output.put_line('Ad Hoc Role Already Exists');
END IF;
SELECT oe_order_headers_s.NEXTVAL
Page 2 of 6
http://apps2fusion.com/apps/workflows/373-workflow-notification-sender-email-address
INTO l_itemkey
FROM dual;
wf_engine.createprocess('XXTEST'
,l_itemkey
,'XXTEST');
wf_engine.setitemuserkey(itemtype => 'XXTEST'
,itemkey => l_itemkey
,userkey => l_itemkey);
wf_engine.setitemowner(itemtype => 'XXTEST'
,itemkey => l_itemkey
,owner => 'SYSADMIN');
--The three API calls in bold is what you need.
wf_engine.setitemattrtext(itemtype => 'XXTEST'
,itemkey => l_itemkey
,aname => '#FROM_ROLE'
,avalue => v_role_name);
wf_engine.setitemattrtext(itemtype => 'XXTEST'
,itemkey => l_itemkey
,aname => '#WFM_FROM'
,avalue => v_role_name);
wf_engine.setitemattrtext(itemtype => 'XXTEST'
,itemkey => l_itemkey
,aname => '#WFM_REPLYTO'
,avalue => v_role_email);
wf_engine.startprocess('XXTEST'
,l_itemkey);
COMMIT;
END;
/
Page 3 of 6
http://apps2fusion.com/apps/workflows/373-workflow-notification-sender-email-address
Page 4 of 6
http://apps2fusion.com/apps/workflows/373-workflow-notification-sender-email-address
COMMENTS
0Naoufel MAMI
It works. Thanks alot and keep updated.
< Prev
Next >
2009-02-01 04:59
rgds
Naoufel
Quote
Thanks
Venkat Reddy Pulichintha
Quote
0Aymen
Hi,
2009-03-04 10:07
Can we send a notification using just Business event subscription without using Oracle workflow ?
Thanks
Quote
0Anil Passi
You need to subscribe a Workflow to send notification.
2009-03-04 15:54
Alternately send the notification using the PL/SQL API, as shown in URL below
http://apps2fusion.com/apps/workflows/219-open-source-in-oracle-apps-generic-workflow-notification-api
Thanks,
Anil Passi
Quote
0Elena
2009-04-03 04:04
Page 5 of 6
http://apps2fusion.com/apps/workflows/373-workflow-notification-sender-email-address
Hi Venkat,
I have found this site yesterday and I got the same error.
XXTEST process doesn't have and effective date that's why you got this error.
As well it open in Read-Only mode.
I have made the same process manually and it worked for me. It put the effective date.
Regards,
Jelena
Quote
0Sreenivasa
Hi Anil,
2009-05-25 08:16
I am getting the following error when trying to execute my custom workflow. Please advice.
1. Compiled the package in APPS schema.
2. Uplaoded the wft file.
3. Then tried to invoke the WF using the following code:
DECLARE
l_itemkey VARCHAR2(100);
v_role_name VARCHAR2(100) := 'SYSADMIN';
v_role_email VARCHAR2(100) := 'XXXX';
n_count_role INTEGER := 0;
BEGIN
SELECT xxitdcus.demand _seq_s.NEXTVAL
INTO l_itemkey
FROM dual;
wf_engine.creat eprocess('ITDDM DIN'
,l_itemkey
,'ITD_DEMAND_AP PROVAL');
wf_engine.setit emuserkey(itemt ype => 'ITDDMDIN'
,itemkey => l_itemkey
,userkey => l_itemkey);
wf_engine.setit emowner(itemtyp e => 'ITDDMDIN'
,itemkey => l_itemkey
,owner => 'SYSADMIN');
wf_engine.start process('ITDDMD IN'
,l_itemkey);
COMMIT;
END;
/
Error in Workflow ITDDMDIN/1006 ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SET_STATUS_APP R'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Thank s & Regards,
Sreeni vasa
Page 6 of 6