In this Article, we will see step by step, how to create a OAF notification and invoke it from workflow.
The OAF notification has many advantages like User can personalize the notification region as per needs and moreover look and feel is same as ths standard notifications. Also these notifications can be personalized to change the text etc without any programming.
1) Create a Document type Item Atribute(Custom Req Line Fwk Region) and specify the value as displayed:
JSP:/OA_HTML/OA.jsp?OAFunc=XXC_POR_REQLINES_NTFN_RN-&reqHdrId=-&DOCUMENT_ID-&funcCurr=-&FUNCTIONAL_CURRENCY
XXC_POR_REQLINES_NTFN_RN ; This function is defined in Oracle Applications and points to the OAF page which we want to embed in the Notification region.
OAF page should be standalone Region(Stack Layout) with a Custom Application Module and Controller attached to it.
============
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
//We can get the parameters(reqHdrId and funcCurr) in the controller and initialize the VO to show the results as mentioned below:
String reqHdrId = pageContext.getParameter("reqHdrId");
String funcCurr = pageContext.getParameter("funcCurr");
Serializable aserializable[] = {
reqHdrId, funcCurr
};
CustomReqLineNotificationAMImpl am = (CustomReqLineNotificationAMImpl)
pageContext.getApplicationModule(webBean);
//We should never call getRootApplicationModule here as it gives the AM specified at
//the Notification Page level and not customApplicationModule
am.invokeMethod("initCustomNotificationVO",aserializable);
}
===========
2) Create a Message "Custom Requisition Approved JRAD"
Message Body:
We can embed any message attribute in the body or subject by specifying &ITEM_ATTR_INTERNAL_NAME. In the below screenshot, we are calling XXC_REQ_LINE_FWK_RN message attribute,
Use the notification in any of the workflow process and do not forget to set the values of message attributes before the notitification activity is invoked.
Points to remember:
-------------
*If we want to display any attribute at header level in the Notification page, we can define message attributes with internal Names(#HDR1) and set their values using Item Attributes.
*We can not call OAF notification using fnd_notification.send API as this API uses the default values of item attributes
*Do not forget to SFTP files on the Apps Tier and import the Custom Notification Region.
Comments
Thanks ,
Senthil
Very good document for the starters of OAF - Workflow.
Thanks for this document.
Ther e is one issue . In my notification page i am enable to embed OAF region , it show following error "Attribute INTEGRATED_REGI ON refers to Framework Region JSP:/OA_HTML/OA .jsp?page=tcsl/ oracle/apps/pa/ wfIntegartedReg ion/webui/wfInt egartedRegionRN .
"
Plz help me out
Thanks
I'm trying to modify iEXPENSES , Approval Request Notification Message Body to send a reminder Notification.
I copied from existing Message OIE_REQ_EXPENSE _REPORT_APPRVL and Created a New Message. And Then called that after the Timeout. I'm getting the Reminder. But Instructions Section is not there in the Message. Any idea why?
In a workflow i have a OAF region refered as
JSP:/OA_HTM L/OA.jsp?page=/ oracle/apps/ap/ invoice/request /negotiation/we bui/NotifPGRN&I NVOICEID=-&INVO ICE_ID-
Now instead of this region i created a new region satisfying my requirements.
Then moved the region and importing to server.
In the Workflow i changed the new region name.
Now when i run my page the old region only displays. In the OAF page also i cant find the region to be called. But the region is available in the server.
Please anyone help me.
Thanks in Advance,
Jegan
I have to customize an OAF region which is being used in workflow notification.
C an we do this.
Thanks
A noop
Yes, you can customize the OAF region used by the notification by extending the controller.You can even do the personalization s if required.
client calls its COA as PTAEO (Project, Task, Award, Expense Type and Organization), the task associated with project are displayed, so on and so forth.
Has anyone come across this situation before and is there another way to achieve the same what $flex$ does.
STATEMEN T IS: WHERE PROJECT_SEG = LTRIM(:$FLEX$.Y UGL_PROJECTS.VA LUE,'0')
All suggestions/sol utions are welcomed.
IF you need more details, also let me know
I am new to the OAF, I have a requirment like,
1. When I click on a reject button on a notification screen a check box has to appear.
2. How should I fetch the check box detail and insert it in a table?
Can u help me...
Thanks !!!
WebBean style not supported (page)
We have implemented an OAF region type document in a workflow notification.
The region has retainAM=N parameter set in function properties, on top of that, we use vo.clearCache() ; and vo.reset(); methods in processRequest for the vo in question.
Whil e navigating through notifications using the same region in "workflow notifications", although the workflow notification subject changes accordingly, the region never refreshes and stays same as it has been rendered for the first time after user login.
I believe this could be due to "workflow notifications" oracle native parent screen retaining the AM, but haven't been able to solve the problem.
Any suggestions would be appreciated.
thanks for the nice article.Can we be able to attach document to a notifcation WHEN Responding.(Not while sending..this is easy)
plesae advice
I am stuck in between one of our requirement for which i need your guidance. The detailed requirement is given as below
Business Scenario :
Expense reports for credit card transactions are created in iexpenses responsiblity. During this process the accounting code combination which is generated is as per the auto-accounting setups as done. For one of the expense report this code combination has been disabled in GL as a result the expense report is hanging in SYSADMIN.
This notification in SYSADMIN has a column by the name "Reason for error" storing information about the reason for the error.
There are various transaction which are of these type in the applications for identifying which a custom report is being created. In this report we want to capture a column by the name "Reason for Error" for which we need to know the table and column where this information is being stored in backend so that the same can be mapped during preparation of custom report.
This information inspite of lot of analysis we are not able to find and need help in this regards.
Please suggest us a breakthrough.
In addition to this let me submit my analysis as done till date :
Analysing from OAF "About this page" section i have been able to extract the below query as given
select distinct ap_validation_e rror from ap_expense_repo rt_lines
Outpu t has three values as the output i.e.
FND
PA
Values have not been entered for one or more required segments.
But the value which we are seeing in the column "Reason for Error". is FNDFLEX-COMBINA TION DISABLED.
I understand 'FND' but from where "FLEX-COMBINATI ON DISABLED" is coming.
I have also discovered that there is a AK region item defined in the application i.e.
Region Name : WF Server Side Validation Errors which has an attribute by the name : AP_WEB_REASON_F OR_ERROR i.e. long label "Reason for Error" .
Also there is a message defined with the name
"FLEX-COMBINATI ON DISABLED"
So far i have been able to reach till this point.
Can anyone help me in relating the AK region with the SYSADMIN notification page and the message and expense report lines table.
Kindly suggest us for a breakthrough and if possible kindly send the suggested approach to my mail as given i.e. ritwikisp8794gmail.com
Thanks and Regards
Ritwik
I am not able to set the attribute using '&' in message.every time i attach the attribute m getting the same error.
Error that i am getting is "Could not find token among message attribute'
RSS feed for comments to this post