Você está na página 1de 1

Send emails to non Oracle Apps users through workflow

Emails can be sent to persons or organizations external to Oracle apps. For instance suppliers or customers
might need certain notifications from Oracle after a certain approval process. The approval process is handled by
workflow. Workflows send out emails to Oracle apps users as they are configured within Oracle. Workflow can
send emails to external email addresses as well. We only need to configure it.
The following code can be used to create the workflow role for the external email address. This is done because
the workflow has to send a notification which will then be interpreted by the email server and sent out as an
email. The workflow role will contain the email address.

!
"
#
$
%
&
'
(
)

!
"
#
$
%
&
'
(
!)
!
!!
!"
!#
!$
!%
!&
!'
!(
")
"
"!
""
"#
"$
"%
"&
"'
"(
*E+,-.E
v/chk/role 0123E.4
v/cc/email 5-.+6-.! 7))8 9: ;abhi<it%&"=gmail.com;4
3E>?0
@@ ?f the user does not existA create it. The role
@@ will be created automatically and the user and role
@@ will also be mapped automatically

@@ +heck whether the role exists or not
BE,E+T +O10T 78
?0TO v/chk/role
F.O2 wf/roles
W6E.E 0-2E : v/cc/email4

@@ The roleCmail address has to be in 1DDE. case for the mail server
@@ to send an external email
v/cc/email 9: 1DDE. 7v/cc/email84

?F lv/chk/role : )
T6E0
wf/directory.createadhocuser 70-2E :E v/cc/emailA
display/name :E v/cc/emailA
,-0>1->E :E 01,,A
territory :E 01,,A
description :E ;EF DO Bupplier user;A
notification/preference :E ;2-?,6T2,;A
email/address :E v/cc/emailA
fax :E 01,,A
status :E ;-+T?5E;A
expiration/date :E 01,,A
parent/orig/system :E 01,,A
parent/orig/system/id :E 01,,
84
E0* ?F4
EG+EDT?O0
W6E0 OT6E.B
T6E0
01,,4
E0*4
Note: The email address and the role name have to be entered in UPPER case or else the email server
will be unable to send the email. This is true only for external email addresses.
0ow we shall Huery the workflow tablesA
select I from wf/roles where name : upper7;abhi<it%&"=gmail.com;8
select I from wf/user/roles where role/name : upper7;abhi<it%&"=gmail.com;8
-fter we trigger off the workflow we can check the activity history in workflow monitorA
+lick on the notificationA
0ote the value of ?* in the notification header. This is the notification id which we shall Huery for in the database
and check for the email status.
select I from wf/notifications where notification/id : $#$$$)
The mail/status shows SENT. This means the recipient has received the email.

Você também pode gostar