Wednesday, 26 July 2006

Oracle Workflow Notifications & OAF

If you wanted to display HTML formatted content in an Oracle Workflow Notifications before the release of FWK.H you had to use one of the following options:

  • PLSQL Documents - 32K size limit
  • PLSQLCLOB Documents – CLOB

PL/SQL development of HTML notifications that contains tables and complex layouts can be difficult and very time consuming. It requires the developer to have a very good knowledge of HTML and makes the implementation of a standard “look and feel” very difficult.

With the implementation of FWK.H we are able to leverage the power of the OAF to create multifaceted Workflow notifications. Also called JRAD notifications, FWK embedded regions is nothing more then a normal OAF region displayed in the body of a Oracle Workflow notification.

Incorporating an embedded FWK region in a Workflow notification consists of the following steps:

  1. Create an OA Component Region containing the Headers, items and tables you want to display in the body of you notification. Developing and implementing this region is done in the exact same way you would when creating a region for an OAF custom page. Remember to create a dedicated Application Module (AM) for your region that will contain all the View Object (VO) required for your layout.
  2. In core applications, create a SSWA jsp function where the WEB HTML call is: OA.jsp?page=/companyabc/oracle/apps/xx/module /webui/XxRegionNameRN
  3. Create a new Workflow attribute:
WorkFlowAttribute

Value: JSP:/OA_HTML/OA.jsp?OAFunc=XX_PO_DOCUMENT_RN_NTFN &poHeaderId=-&PO_HEADER_ID-

XX_PO_DOCUMENT_RN_NTFN is the custom function created in core apps and &PO_HEADER_ID is a workflow attribute I am passing back as a parameter to the region's controller to initialize my VO.

4. Add the new attribute to your message:

WorkFlowAttribute

Save your workflow and initialize a new instance, the notification body should now be populated by the OAF region. No messy HTML coding, quick, easy and you can reuse the region in your OAF custom pages.


Tuesday, 18 July 2006

OAF and Oracle Workflow

Most of the custom development work I have done on OAF has required me to interact with Oracle Workflow, specifically to handle approvals and interfaces. The class oracle.apps.fnd.framework.webui.OANavigation provides Java wrappers for Oracle Workflow Engine's PL/SQL APIs.

The class is actually intended for use when creating and managing OA Framework Page Flows that are defined by Oracle Workflow, but can also be used to interface with Oracle eBS Workflows.

Example Code - Launching a custom Oracle eBS Workflow from a OAF page:

import oracle.apps.fnd.framework.webui.OANavigation;
import java.math.BigDecimal;

public void launchCustomWorkFlow(OAPageContext pageContext)
{
String wfItemType = "CUSTOM";
String wfProcess = "CUSTOM_PROCESS";
String wfItemKey = "1001-1";

OANavigation wfClass = new OANavigation();

// Create Workflow Process
wfClass.createProcess(pageContext, wfItemType, wfProcess, wfItemKey);

// Set Number Attribute: ITEM_INTERFACE_ID
wfClass.setItemAttrNumber(
pageContext,
wfItemType,
wfItemKey,
"ITEM_INTERFACE_ID",
new BigDecimal(1));

// Set Text Attribute:
ITEM_NAME
wfClass.setItemAttrText(pageContext, wfItemType, wfItemKey,
"ITEM_NAME", "ITEM1");

// Start Workflow Process
wfClass.startProcess(pageContext, wfItemType, wfProcess, wfItemKey);
}

Tuesday, 11 July 2006

Getting started with OAF development

I have recently received a number of queries related to OAF development, particularly regarding the quickest way to get started. I will handle these questions in a two part post, in the first I will aim to provide you with the basic software and documentation requirements to get started. In the second post we will have a look at a couple of common OAF extension tasks.

OAF development can be split into two major categories namely:

  • Personalization refers to the ability to declaratively alter the UI to suit user or business needs.
  • Extensibility refers to the ability to programmatically extend an application's functionality.

Personalization is the quickest and easiest way of altering the OAF UI, changes are protected from future upgrades and most personalization tasks can be performed by functional consultants or even trained users. If you have any requirement to alter the OAF UI, personalization should be your first stop. The following document will be of great help in understanding and implementing OAF personalization:

Metalink Doc ID: 236618.1 - OA Framework Personalization and Extensibility Guide: Version 5.7+

Extensibility is used when you are required to implement changes to functionality not provided by personalization, or when you are required to develop add-on/new functionality to the OAF UI.

The following steps will get you up to speed with the correct software and documentation:

  • Follow post: Find the right JDeveloper Patch for OAF development, once you determine the correct JDeveloper version for your development environment you can proceed to download the JDev patch from Metalink.
  • Once downloaded, follow the installation step set out in the OAEXT_README.txt document, located in the root directory of the patch file.
  • Oracle included excellent documentation with the JDeveloper patch, after installation you can locate the documentation index here: JDEV_INSTALL_DIR/jdevdoc/index.htm
  • Follow “You are Customer, Consultant or Support Representative” in Chapter 1: Setting Up your Development Environment of the OA Framework developers guide, make sure you complete all setup steps successfully.

Congratulations you have successfully installed and configured your new development tool, now it’s time to get into the documentation. I suggest you complete Chapter 1, 2 and 3 of the OA Framework developers guide.

You can then proceed with the Oracle Applications Framework ToolBox Tutorial, it is an excellent step by step introduction to OAF development and extension, and will introduce you to all the key concepts required for OAF customization.

Keep tuned for part 2: Include a new column - Extending a standard LOV view object.