Friday, November 20, 2009

Some learnings in Oracle Workflow Notification

Message Templates : Oracle comes seeded with Message templates in the System: Mailer Item type (WFMAIL). If there are any extra messages that comes in the notification apart from that mentioned in the message body, the same comes from the Message template.

Points to note
1. Do not modify Oracle Supplied Message templates
2. One can add new custom Message templates in the Item Type System: Mailer or in your own Item Type.

To reference the Custom Message Template
1. Create a message attribute by name "#WFM_OPEN_MAIL_FYI" under the message which has your information.
2. The value much have the template message given in format :

Message Attirbutes : Allow you to modify fetures of Workflow notification, without having to create seperate workflow mailers. Various Special Message attributes like few given below
#WFM_FROM - Change the from email address in notification
#WFM_REPLYTO - Changes the Reply To Email

Document Message Attribute : Allow you to build a message body from a query. These type of attribute references PL/SQL procedures to build a text stream.
Document Attributes Values plsql:/
procedure = PL/SQL Procedure
document_identifier = usually a concatenation of ITEM_TYPE:ITEM_KEY
example
apps.wf_engine.setitemattrdocument
(itemtype => 'WWAPAPR',
itemkey => l_curval,
aname => 'WW_OUTPUT_ATTACH',
documentid => 'PLSQLBLOB:ww_ap_pay_approval_wf_pkg.ww_set_ntf_attr/'
|| TO_CHAR (g_request_id)
);

PROCEDURE ww_set_ntf_attr (
document_id IN VARCHAR2,
display_type IN VARCHAR2,
document IN OUT BLOB,
document_type IN OUT VARCHAR2
)

document_id has the value passed from g_request_id

Workflow messages are not versioned and so any addition in the message attributes will effect the immediatly running notifications.

Workflow Notification Testing
1. Modify the Workflow Mailer Configuration using OAM
2. Enter an email address for the Test Address

Further reference
http://www.jrpjr.com
http://www.norcaloaug.org

No comments:

Post a Comment