How to use OAF Region in Oracle Workflow Notification Message
Hello,
In Oracle Workflow, notification message contents are mostly PL/SQL generated HTML documents. In this tutorial, I am going to show how to use OAF Regions in Oracle Worklfow notification messages.
Before starting, we will use a previously developed OAF page layout as a standalone region. You can check that tutorial by clicking here.
1. Open JDeveloper and right click to webui package and select “New”.
2. Select Web Tier -> OA Componenets -> Region and click OK button.
3. Change region properties with the followings:
Name | Package | Style |
---|---|---|
XxTableDmlRN | xxntc.oracle.apps.per.aniltablo.dml.webui | stackLayout |

Property | Value |
---|---|
Controller Class | xxntc.oracle.apps.per.aniltablo.dml.webui.XxTableDmlRNCO |
AM Definition | xxntc.oracle.apps.per.aniltablo.dml.server.XxTableDmlAM |
Standalone | false |
Controller Class:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
/*===========================================================================+ | Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA | | All rights reserved. | +===========================================================================+ | HISTORY | +===========================================================================*/ package xxntc.oracle.apps.per.aniltablo.dml.webui; import oracle.apps.fnd.common.VersionInfo; import oracle.apps.fnd.framework.OAApplicationModule; import oracle.apps.fnd.framework.webui.OAControllerImpl; import oracle.apps.fnd.framework.webui.OAPageContext; import oracle.apps.fnd.framework.webui.OAWebBeanConstants; import oracle.apps.fnd.framework.webui.beans.OAWebBean; /** * Controller for ... */ public class XxTableDmlRNCO extends OAControllerImpl { public static final String RCS_ID="$Header$"; public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion(RCS_ID, "%packagename%"); /** * Layout and page setup logic for a region. * @param pageContext the current OA page context * @param webBean the web bean corresponding to the region */ public void processRequest(OAPageContext pageContext, OAWebBean webBean) { super.processRequest(pageContext, webBean); OAApplicationModule am = pageContext.getApplicationModule(webBean); am.invokeMethod("executeOafAnilPersonelVO"); } /** * Procedure to handle form submissions for form elements in * a region. * @param pageContext the current OA page context * @param webBean the web bean corresponding to the region */ public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { super.processFormRequest(pageContext, webBean); OAApplicationModule am = pageContext.getApplicationModule(webBean); if (pageContext.getParameter("Apply") != null) { am.invokeMethod("apply"); } else if ("addNewRow".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))) { am.invokeMethod("addNewRow"); } else if ("deleteSelectedRows".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))) { am.invokeMethod("removeSelectedRows"); } } } |
5. Copy everything under pageLayout from previous tutorial and paste all of them into stackLayout region.
6. Build the project and import the region into database. I used import.bat script which is under \jdevin\oaext\bin
1 2 3 |
import C:\DemoOAF\jdevhome\jdev\myprojects\xxntc\oracle\apps\per\aniltablo\dml\webui\XxTableDmlRN.xml -rootdir C:\DemoOAF\jdevhome\jdev\myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=demo)(PORT=1521))(CONNECT_DATA=(SID=VIS)))" |
7. Put the class and bc4j xml files into server through FTP.
8. Define a form function for the region in EBS.
Fonksiyon | Kullanıcı Adı Fonksiyonu | Tip | Web HTML |
---|---|---|---|
XX_DML_TABLE_RN | XX_DML_TABLE_RN | SSWA jsp fonksiyonu | OA.jsp?page=/xxntc/oracle/apps/per/aniltablo/dml/webui/XxTableDmlRN |



Internal Name | Display Name | Description |
---|---|---|
XXOAFTST | XXOAFTST | XXOAFTST |

Internal Name | Display Name | Description |
---|---|---|
XXOAFTST_PRC | XXOAFTST_PRC | XXOAFTST_PRC |


11. Create a performer attribute which is the role that receive notifaction message.
Internal Name | Display Name | Description | Type | Default Type | Default Value |
---|---|---|---|---|---|
XX_PERFORMER | XX_PERFORMER | XX_PERFORMER | Text | Constant | NTC_ANIL |


Internal Name | Display Name | Description |
---|---|---|
XX_OAF_MSG | XX_OAF_MSG | XX_OAF_MSG |
13. Create a new attribute into the message.
Internal Name | Display Name | Description | Type | Source | Frame Target | Default Type | Default Value |
---|---|---|---|---|---|---|---|
XX_OAF_REGION | XX_OAF_REGION | XX_OAF_REGION | Document | Respond | New Window | Constant | JSP:/OA_HTML/OA.jsp?OAFunc=XX_DML_TABLE_RN |


15. Create a new notification.
Internal Name | Display Name | Description | Result Type | Message | Performer Type | Performer Value |
---|---|---|---|---|---|---|
XX_OAF_NOTIF | XX_OAF_NOTIF | XX_OAF_NOTIF | <None> | XX_OAF_MSG | Item Attribute | XX_PERFORMER |


17. Draw the process. Connect start to notification and notificaiton to end.
18. Save workflow file into database.
19. Start workflow with following script.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
declare l_item_key varchar2(30) := 'TEST-8'; l_item_type varchar2(10) := 'XXOAFTST'; l_process varchar2(30) := 'XXOAFTST_PRC'; begin wf_engine.createprocess (l_item_type, l_item_key, l_process, l_item_key); wf_engine.startprocess (l_item_type, l_item_key); commit; exception when others then dbms_output.put_line(sqlerrm); end; |
20. Test the results. Verify that OAF region placed in notification message and DML operations are working properly.
21. In order to check the results, Login with SYSADMIN. Go to “Workflow Administrator Web Applications”->”Administrator Workflow->”Status Monitor”. Find workflow that we already started with pl/sql script. Click to Go and list workflows. Select workflow and click “Activity History” button and open notification.
WoW…..Excellent one tq
Great info.
But how to pass parameters to OAF page from workflow and fetch those parameters OAF page and display the information..Please reply
Excellent, very easy to follow the steps.
Can you please also flash some light to pass parameters.
Thanks for sharing this wonderful information about Oracle Frameworks.
You have given the best Examples and Pictures.
SMConsultant