If you have any problems and suggestions you can send email to my email address:zhaochengxiang0@gmail.com.i want you!! (+_+)
1.检测Workflow Notification Mailer配置是否可以发邮件。
step1:Workflow Administrator Web-->Oracle Applications Manager-->Workflow Manager 页面上Notification Mailers和Agent Listeners是否打开。如果没有点Notification Mailers进行配置。
step2:Test Mailer 进行测试。点击上图的Test Mailer 按钮进行测试。
<Oracle+Workflow实力详解.doc>
http://www.baidu.com/s?tn=baiduhome_pg&ie=utf-8&bs=Oracle%2BWorkflow+%E5%AE%9E%E5%8A%9B%E8%AF%A6%E8%A7%A3.doc&f=8&rsv_bp=1&rsv_spt=1&wd=Oracle%2BWorkflow+%E5%AE%9E%E4%BE%8B%E8%AF%A6%E8%A7%A3.doc&inputT=11217
Workflow Notification Mailer Setup
Oracle Workflow Administrator's Guide
http://docs.oracle.com/cd/E18727_01/doc.121/e12903/T319398T319402.htm#T319579
2.PL/SQL
KAGE:hp_test_sendmail_pkg
API:
WF_DIRECTORY.CreateAdHocRole(role_name => v_role_email,
role_display_name => v_role_email,
language => 'AMERICAN',
territory =>'AMERICA',
email_address => v_role_email,
notification_preference =>'MAILHTM2',
role_users => l_users,
status =>'ACTIVE',
expiration_date =>NULL);
Parameter:
email_address:--发送email不能为空
notification_preference--Indicate how this role receives notifications: 'MAILTEXT', 'MAILHTML', 'MAILATTH', 'MAILHTM2', 'QUERY', 'SUMMARY', or, for Oracle Applications only, 'SUMHTML'. If null, the procedure sets the notification preference to'MAILHTML'.
role_users:--need to pass a comma or space delimited list如:role_users => 'OFFSHORE, BDEVLIN' 或者为null
API--Oracle Workflow API Reference
http://web.njit.edu/info/limpid/DOC/workflow.102/b15855/toc.htm
notification_preference参数详情--Oracle Workflow Administrator's Guide
http://docs.oracle.com/cd/E18727_01/doc.121/e12903/T319398T319402.htm#I_choosenp
测试使用的PL/SQL:
CREATEORREPLACEPACKAGEBODY hp_test_sendmail_pkg AS
procedure SEND_WFM_OPEN_MAIL(nn invarchar2defaultnull)is
l_itemtypeVARCHAR2(100) := 'HP_016';
l_itemkeyVARCHAR2(100);
v_role_emailVARCHAR2(100) := 'YourTestingEamilAddress@gmail.com';
n_count_roleINTEGER := 0;