Presentation to XYZ Company

Download Report

Transcript Presentation to XYZ Company

OA Framework Extension:
A Case Study in HR Self Service
Presented By: Bolton Carroll
August 15, 2008
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
Agenda
•
•
•
•
•
•
System Background
Business Requirement
Potential Solutions
OA Framework Basics
Solution Details
Questions
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
2
System Background
•
•
•
•
•
Oracle Applications 11.5.10 ATG RUP 5
JDeveloper 9i (Version 9.0.3.5)
JDeveloper from patch 6012619
Workflow is HRSSA (HR)
Workflow process: Approvers Notification
Process
• Workflow notification: Notify Approver
• Workflow message: Notify Approver
(Embedded)
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
3
Business Requirement
• Appraisal Approval needs user confirmation, to
avoid approval happening without some
additional reflection
• Appraisal Rejection should not be allowed
• If appraisal approval is attempted without
checking confirmation check box, there should
be an error displayed to user
• If appraisal rejection is attempted, there should
be an error displayed to user
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
4
Appraisal Approval Notification
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
5
Potential Solutions
•
•
•
•
Workflow Post-notification function
Workflow Message modification
OA Framework Extension with OADialog page
OA Framework Extension with custom check
box
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
6
Workflow Post-Notification
• Post-notification function is called after the user
responds through the Self Service Web page
• PL/SQL code can return an error based on response
received
• Limitation: if an error is raised from plsql, the original OA
Framework page calling the workflow loses its
transaction data and causes an error in the Self Service
Web page
• Limitation: post-notification function for approve option
does not allow a confirmation page. The only choice is to
allow approval or to raise an error.
• Based on limitation, this solution was not acceptable
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
7
Post-notification Function
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
8
Post-notification code
if (funcmode = 'VALIDATE') THEN
l_notification_id := wf_engine.context_nid;
l_response :=
wf_notification.getattrtext(l_notification_id,
'RESULT');
If l_response = 'REJECTED' THEN
-- result := 'ERROR: Reject is not an option, use
--Return instead';
RAISE_APPLICATION_ERROR(-20001, 'Reject Not Allowed-use
Return instead');
END IF;
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
9
Workflow Message Modification
• Considered removing reject option from lookup
codes in result type
• Limitation: same approval message is used by
several different HR processes, and removing
reject option from the other processes was not
possible
• Removing reject option was not an acceptable
option
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
10
Workflow Message Modification
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
11
OA Extension with OADialogPage
• OADialogPage is a java class that helps display
interactive dialog with user
• Allows different navigation paths based on user
response
• Limitation: Was not possible to direct user to
Approve action using a target url
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
12
OA Extension with Custom Check Box
• Custom check box will be added to page with a
personalization
• If the user clicks approve without checking
custom check box, an error will display
• If user checks custom check box and then clicks
approve, the appraisal will be approved
• If user clicks reject, an error will display and the
appraisal will not be rejected
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
13
OA Framework Basics
• Set up JDeveloper environment
• Import into JDeveloper xml page and
business component objects needed
• Create and test extensions in JDeveloper
• Migrate extensions to application server
• Bounce apache
• Run new extended page from applications
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
14
Solution: Overview
• Create custom message to display in Application
Developer
• Create custom checkbox through a
personalization on page that displays approval
options
• Create custom java controller class that extends
controller class for approval page
• Create personalization that replaces the Oracle
controller class with the new custom class
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
15
Defining Custom Message
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
16
Create Custom Checkbox
• Add new item on Notification Page
• Type of item is Message Check Box
• Use css class called
OraMessageBoxErrorParagraph to make text
appear in red
• Set at either site, function, or responsibility level
• Note that this checkbox will appear in all
notification detail pages
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
17
Create Custom Checkbox
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
18
Create Custom Checkbox
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
19
Create Custom Checkbox
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
20
Create Custom Checkbox
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
21
Create Custom Controller
• Determine controller class for Notifications page
using About this page (CustomPageLayoutCO)
• Create new custom class which extends main
controller
• Handle logic for different scenarios
• Display proper messages based on user
response
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
22
Determine Controller Class
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
23
Extend Standard Controller Class
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import
oracle.apps.fnd.framework.webui.beans.message.OAMessageCheckBoxBean;
import
oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean;
import java.util.Enumeration;
public class xxcusCustomPageLayoutCO extends CustomPageLayoutCO
{
….
}
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
24
Process Logic in Custom Class
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
25
Is this Notification for an Appraisal?
public void processFormRequest(OAPageContext oapagecontext,
OAWebBean oawebbean)
{
try
{
OAMessageChoiceBean xxcusSystem =
(OAMessageChoiceBean)oawebbean.findIndexedChildRecursive
("SysOverallRating");
…..
}
catch (java.lang.NullPointerException e)
{
// this exception catches all notifications that don't have
// SysOverallRating field. These are not appraisal approvals.
super.processFormRequest(oapagecontext,oawebbean);
}
…….
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
26
Getting checkbox value
public void processFormRequest(OAPageContext oapagecontext,
OAWebBean oawebbean)
{
OAMessageCheckBoxBean xxcusCheckBox =
(OAMessageCheckBoxBean)oawebbean.findChildRecursive("bctest");
Object xxcusChecked = xxcusCheckBox.getValue(oapagecontext);
String xxcusCheckValue = xxcusChecked.toString();
if (xxcusCheckValue.equals("N")) // if user does not check confirm box
……
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
27
Viewing available parameters
public void processFormRequest(OAPageContext oapagecontext,
OAWebBean oawebbean)
{
StringBuffer buf = new StringBuffer("Params: ");
Enumeration enumer = oapagecontext.getParameterNames();
String key = "";
while ( enumer.hasMoreElements()
{ key = (String) enumer.nextElement();
if( oapagecontext.getParameter( key ) != null)
{
buf.append("--"+ key+ ":" +
oapagecontext.getParameter(key));
}
}
throw new OAException(buf.toString(),OAException.ERROR);
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
28
Parameter Analysis
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
29
Getting parameter values
public void processFormRequest(OAPageContext oapagecontext,
OAWebBean oawebbean)
{
try
{
if (oapagecontext.getParameter("wklEvent").equals("RR0"))
// this means this is an attempt to approve
….
if (oapagecontext.getParameter("wklEvent").equals("RR1"))
// attempt to reject
……
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
30
Checking for existence of parameter
public void processFormRequest(OAPageContext oapagecontext,
OAWebBean oawebbean)
{
try
{
String approveFlag = "N";
StringBuffer buf = new StringBuffer("Params: ");
Enumeration enumer = oapagecontext.getParameterNames();
String key = "";
while ( enumer.hasMoreElements() )
{ key = (String) enumer.nextElement();
if (key.equals("NRR0"))
// this is only on approve page, not on delete page
{
approveFlag = "Y" ;
break;
}
}
.......
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
31
Displaying Message for Approval
public void processFormRequest(OAPageContext oapagecontext,
OAWebBean oawebbean)
{
try
{
…….
if (approveFlag.equals("Y"))
{
throw new OAException("XXCUS",
"XXCUS_APPRAISAL_CONFIRM", null,OAException.ERROR, null);
}
…….
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
32
Displaying Message for Rejection
public void processFormRequest(OAPageContext oapagecontext,
OAWebBean oawebbean)
{
try
{
…….
if (oapagecontext.getParameter("wklEvent").equals("RR1"))
// attempt to reject an appraisal
{
throw new OAException("You may not reject this appraisal, you must
return to initiator",OAException.ERROR);
}
…….
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
33
Personalization for Controller Class
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
34
Personalization for Controller Class
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
35
Error message: Check box unchecked
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
36
Error message: Reject attempt
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
37
OA Framework Resources
•OA Framework Developer’s Guide
•Jdeveloper OA Framework Tutorials
•http://apps2fusion.com/forums/
•http://www.oaug.org/conferencesandeducation/
papers/collaborate07/jlockhart_wp.pdf
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
38
Questions
•For more information and to receive more OA
Framework Extension examples, contact:
Bolton Carroll, [email protected]
•The Revere Group: the North American
division of NTT Data, a $10 billion multinational
company. Certified Oracle Partner, with
headquarters in Chicago, IL.
www.reveregroup.com
© 2008—The Revere Group, an NTT Data Company. All rights reserved.
This proposal contains proprietary and confidential information and is being submitted solely for client evaluation purposes.
39