Showing posts with label AppsTechStack. Show all posts
Showing posts with label AppsTechStack. Show all posts

Friday, May 30, 2014

What is new in R12

MOAC

Multi-Org in simple term means the implementation of multiple business units (or Organization) under a single installation of Oracle Applications. The concept of Multi-Org will manage the operations of an enterprise which has got subsidiaries across globe under a single oracle apps window, taking appropriate care of data security and data maintenance.
It decides how transactions flow through different organizations and how those organizations interact with each other.
  • By MOAC (Multiorg Access Control) , we can be able to access  multiple operating units at a time.
  • Mutiorg views were replaced with MOAC Based synonyms.
  • MO:Security Profile is a new profile added in R12.
  • VPD(Virtual Private Database) System will take care of  Data security in R12
  • Org Initialisation process in R12 :
begin
   mo_global.set_policy_context('S','204');
 end;
MOAC Synonym Initialization:
begin
   FND_GLOBAL.APPS_INTILISE('APPLICATION_ID','RESPONSIBILTY_ID,'USER_ID');
   MO_GLOBAL.INIT('SQLAP'); -- Application Short Name
end;

Module wise change 11i to R12

1) General Ledger :

  • gl_sets_of_books table was replaced with gl_ledgers and gl_ledger_Sets.
  • 4c’s comes in R12  Currency,Calendar,Chart of accounts, Accounting Convention , In 11i,  there are 3c’s ( Currency,Calendar,Chart of accounts)

2) Accounts Payable :

  • ap_invoice_lines_all table added in R12.
  • ap_invoice_distributions_all table populates the data when ever invoice gets accounted.
  • Supplier form was converted from form based solution to webbased solution.
  • po_vendors tables replaced with ap_suppliers tables.
  • Supplier and customer information was defined together Under TCA(Trading Community Architecture).
  • Accounting Tables were modified.
  • Both supplier and customer bank information was defined under payments(New application in R12) Application.
11i Tables R12 Tables
po_vendors ap_suppliers
po_vendor_sites_all ap_supplier_sites_all
po_vendor_contacts ap_supplier_contacts
ap_banks ce_banks
ap_bank_branches ce_bank_branches
ap_ae_headers_all xla_ae_headers
ap_ae_lines_all xla_ae_lines
ap_ae_accounting_events xla_events

3) Suppliers

11i Tables R12 Tables
po_vendors ap_suppliers
po_vendor_sites_all ap_supplier_sites_all
po_vendor_contacts ap_supplier_contacts
Additional supplier related tables in IBY (Payments) and HZ (TCA):
IBY_EXTERNAL_PAYEES_ALL – stores Payee(supplier) information.
HZ_PARTIES – Party data for the suppliers.
HZ_PARTY_SITES – Party site data for the supplier sites.

4) Invoices:

In 11i , Only two table ,AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS_ALL but R12 Additional table  AP_INVOICE_LINES_ALL
Allocations – AP_CHRG_ALLOCATIONS_ALL is obsolete in R12

5) Bank Account Details

11i R12
AP_BANK_ACCOUNTS_ALL CE_BANK_ACCOUNTS
AP_BANK_ACCOUNT_USES_ALL CE_BANK_ACCT_USES_ALL
AP_CHECK_STOCKS_ALL CE_PAYMENT_DOCUMENTS

 6) Sub-ledger Accounting

SLA is rule based accounting hub in Release 12 (R12) of the Oracle E-Business Suite of applications. SLA is used to derive all attributes required to account a transaction in Oracle General Ledger.
SLA can be configured in many ways to help derive accounting attributes such as the entered amount, accounted amount, date, currency code as well as the more complex attributes like ledger, code combination ID (CCID). SLA accounting attributes are interfaced to GL from SLA, thus in R12 no sub ledger application module (i.e. AP, PO, PA etc) interfaces the transactions directly to GL.
Create Accounting :  Subledger tables and xla_events -> xla_ae_headers, xla_ae_lines and xla_distribution_links
Transfer to GL -: xla_ae_headers and xla_ae_lines -> gl_je_headers and gl_je_lines
Post to GL : gl_je_headers and gl_je_lines -> gl_balances
Subledger Accounting Balances Update  :  xla_ae_headers and xla_ae_lines -> xla_control_balances
11i R12
AP_ACOCUNTING_EVENTS_ALL XLA_EVENTS
AP_AE_HEADERS_ALL XLA_AE_HEADERS
AP_AE_LINES_ALL XLA_AE_LINES

7) Trial Balance:

New R12 Table
XLA_TRIAL_BALANCES
AP_LIABILITY_BALANCE-> not used in new R12 transactions
AP_TRIAL_BALANCE -> not used in new R12 transactions

8) Taxes:
Functionality provided by E-Business Tax
New tables in R12
ZX_LINES – Detailed Tax lines for the invoice (trx_id = invoice_id)
ZX_LINES_SUMMARY – Summary tax lines for the invoice (trx_id = invoice_id)
ZX_REC_NREC_DIST – Tax distributions for the invoice (trx_id = invoice_id)
ZX_LINES_DET_FACTORS – Tax determination factors for the invoice (trx_id = invoice_id)

9) Order Management

RA_CUSTOMERS ,RA_SITE_USES_ALL ,RA_ADDRESSES_ALL views were removed in R12. in place of ra_customers,ra_site_uses_all,ra_addresses_all views need to use the below mentioned base tables.

  • HZ_CUST_ACCOUNTS
  • HZ_PARTIES
  • HZ_CUST_SITE_USES_ALL
  • HZ_CUST_ACCT_SITES_ALL
  • HZ_PARTY_SITES
  • HZ_LOCATIONS

Friday, August 3, 2012

Interfaces


What is a interface?
In terms of oracle applications interface is a communication channel that allows the data to move in and out of the system.

How many types of interfaces are there?
1.INBOUND INTERFACES
2.OUTBOUND INTEFACES

Inbound InterFace:The one which allows data to get into oracle application from outside is called inbound interface.

OutBound Interface:The one which allows data to get data from oracle applications to other systems is called outbound interface.

What are different types of inbound interfaces available?
1.Open interfaces
2.API's(Application Program Interface)
3.EDI(Electronic Data interchange)--Mainly used for automation transactions with third party systems
4.XML GATEWAY --Mainly used for automation transactions with third party systems
5.WEBADI--Used for uploading data from excel with the scope to have some validations--mainly used for one time loading..Just like sqlloader+validation program..
5.PLSQL Packages for Reading XML Data--Use this in case of importing non stadard transactions

What are different types of outbound interfaces available?
1.Custom programs where we pull data to a csv file using UTL_FILE in the required format
2.EDI
3.XMLGATEWAY
4.PLSQL Packages for generating XML

What is the difference between OPEN INTERFACE & API's?
OPEN INTERFACE:
I dont see much difference between the open other than the way we load data.
In case of open interface the data is loaded in to open interfce table like GL_INTERFACE or Sales Order Interface(OE_ORDER_HEADERS_IFACE_ALL).
Run the interface import program.
This will validate the data and put it into oracle applications.All the invalid records are marked as Error.
One thing is there are GUI Screens available for most of these interface where you check the errror message correct it there only and resubmit the interface.
From the technical perspective there are Error tables available for each interface

API:
API's are the oracle built packages where the validation logic is wrapped inside a package and the data is passed as parameters to the API.
Most of these api's use the PLSQL tables as paremeters to take the advantage of bulk binding concepts for faster loading data.
THey will have the two OUT parameterst to throw back the error code and message in case of data validation failure
Apis' are compartively faster than open interfaces.
If a API's and open interface are available it is better to load through API's.If the records are more...

Source: http://oracleappstechnicalworld.blogspot.in/search/label/INTERFACES

Thursday, July 5, 2012

FNDLOAD Scripts

Here are the FNDLOAD Scripts to Migrate 15 different AOL Entities

    Profile Options
    Forms
    Functions
    Menus
    Responsibilities
    Request Groups
    Request Sets
    Lookups
    Valuesets
    Descriptive Flexfields
    Key Flexfields
    Concurrent Programs
    Form Personalization
    Fnd Users
    Alerts

1.Profile Options:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct XXPRNAME.ldt
PROFILE PROFILE_NAME=”XXPRNAME” APPLICATION_SHORT_NAME=”PN”
Target:
FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct XXPRNAME.ldt
FNDLOAD apps/apps 0 Y UPLOAD_PARTIAL $FND_TOP/patch/115/import/afscprof.lct XXPRNAME.ldt PROFILE PROFILE_NAME=” XXPRNAME” APPLICATION_SHORT_NAME=”PN”

2.Forms:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XXFRMNAME.ldt FORM APPLICATION_SHORT_NAME=”PN” FORM_NAME=”XXFRMNAME”
Target:
FNDLOAD apps/apps 0 Y UPLOAD @FND:patch/115/import/afsload.lct XXFRMNAME.ldt


3.Functions:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XXFUNNAME.ldt FUNCTION FUNC_APP_SHORT_NAME=”PN” FUNCTION_NAME=”XXFUNNAME”
Target:
FNDLOAD apps/apps O Y UPLOAD @FND:patch/115/import/afsload.lct XXFUNNAME.ldt


4.Menus:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XXMNNAME.ldt MENU MENU_NAME=”XXMNNAME”
Target:
FNDLOAD apps/apps 0 Y UPLOAD @FND:patch/115/import/afsload.lct XXMNNAME.ldt


5.Responsibilities:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct XXRESNAME.ldt FND_RESPONSIBILITY RESP_KEY=”XXRESNAME”
Target:
1. FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct XXRESNAME.ldt
2.FNDLOAD apps/apps 0 Y UPLOAD_PARTIAL $FND_TOP/patch/115/import/afscursp.lct XXRESNAME.ldt FND_RESPONSIBILITY RESP_KEY=”XXRESNAME” APPLICATION_SHORT_NAME=”PN”


6.Request Groups:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpreqg.lct XXRQGNAME.ldt REQUEST_GROUP REQUEST_GROUP_NAME=”XXRQGNAME” APPLICATION_SHORT_NAME=”PN”
Target:
1. FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpreqg.lct XXRQGNAME.ldt
2. FNDLOAD apps/apps 0 Y UPLOAD_PARTIAL $FND_TOP/patch/115/import/afcpreqg.lct XXRQGNAME.ldt REQUEST_GROUP REQUEST_GROUP_NAME=”XXRQGNAME” APPLICATION_SHORT_NAME=”PN”


7.Request Sets:
Source:
1. FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct XXRQSNAME.ldt REQ_SET REQUEST_SET_NAME=”XXRQSNAME”
2. FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcprset.lct XXRQSLNAME.ldt REQ_SET_LINKS REQUEST_SET_NAME=”XXRQSNAME”
Target:
1.FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct XXRQSNAME.ldt
2.FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afcprset.lct XXRQSLNAME.ldt


8.Lookups:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct XXLKPNAME.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME=”PN” LOOKUP_TYPE=”XXLKPNAME”
Target:
1.FNDLOAD apps/apps 0 Y UPLOAD aflvmlu.lct XXLKPNAME.ldt
2.FNDLOAD apps/apps 0 Y UPLOAD_PARTIAL $FND_TOP/patch/115/import/aflvmlu.lct XXLKPNAME.ldt FND_LOOKUP_TYPE LOOKUP_TYPE=”XXLKPNAME” APPLICATION_SHORT_NAME=”PN”


9.Value sets:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XXVALSNAME.ldt VALUE_SET FLEX_VALUE_SET_NAME=”XXVALSNAME”
Target:
1.FNDLOAD apps/apps 0 Y UPLOAD afffload.lct XXVALSNAME.ldt
2.FNDLOAD apps/apps 0 Y UPLOAD_PARTIAL $FND_TOP/patch/115/import/afffload.lct XXVALSNAME.ldt VALUE_SET FLEX_VALUE_SET_NAME=”XXVALSNAME” APPLICATION_SHORT_NAME=”PN”


10.Descriptive Flex-fields:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XXDFFNAME.ldt DESC_FLEX P_LEVEL=’COL_ALL:REF_ALL:CTX_ONE:SEG_ALL’ APPLICATION_SHORT_NAME=”PN”
DESCRIPTIVE_FLEXFIELD_NAME=”PN_LEASE_DETAILS” P_CONTEXT_CODE=”Global Data Elements”
Target:
FNDLOAD apps/apps 0 Y UPLOAD @FND:patch/115/import/afffload.lct XXDFFNAME.ldt


11.Key Flex-fields:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afffload.lct XXKFFNAME.ldt KEY_FLEX P_LEVEL=’COL_ALL:FQL_ALL:SQL_ALL:STR_ONE:WFP_ALL:SHA_ALL:CVR_ALL:SEG_ALL’
APPLICATION_SHORT_NAME=”FND” ID_FLEX_CODE=”key flex code” P_STRUCTURE_CODE=”structure name”
Target:
FNDLOAD apps/apps 0 Y UPLOAD @FND:patch/115/import/afffload.lct XXKFFNAME.ldt


12.Concurrent Programs:
Source:
FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXCPNAME.ldt PROGRAM APPLICATION_SHORT_NAME=”PN” CONCURRENT_PROGRAM_NAME=”XXCPNAME”
Target:
1.FNDLOAD apps/apps 0 Y UPLOAD @FND:patch/115/import/afcpprog.lct XXCPNAME.ldt
2.FNDLOAD apps/apps 0 Y UPLOAD_PARTIAL $FND_TOP/patch/115/import/afcpprog.lct XXCPNAME.ldt PROGRAM CONCURRENT_PROGRAM_NAME=”XXCPNAME” APPLICATION_SHORT_NAME=”PN”


13.Form Personalization:
Source:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct XXFPNAME.ldt FND_FORM_CUSTOM_RULES function_name=”XXFPNAME”
Target:
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct XXFPNAME.ldt


14.FND Users:
Source:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct ./XXUSERNAME.ldt FND_USER USER_NAME=’XXUSERNAME’
Target:
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct ./ XXUSERNAME.ldt


15.Alerts:
Source:
FNDLOAD apps/apps 0 Y DOWNLOAD $ALR_TOP/patch/115/import/alr.lct XXALERTNAME.ldt ALR_ALERTS APPLICATION_SHORT_NAME=PER Alert_name=”XXALERTNAME”
Target:
FNDLOAD apps/apps 0 Y UPLOAD $ALR_TOP/patch/115/import/alr.lct XXALERTNAME.ldt ALR_ALERTS APPLICATION_SHORT_NAME=PER Alert_name=”XXALERTNAME”

Source: http://oracleappsdna.com/2011/08/fndload-scripts-to-migrate-aol-entities/

Tuesday, April 17, 2012

Lexicals and Bind variables

Lexicals can be confusing for new developers. Lexicals & Bind variables are used in the following technology sets:

1. BI Publisher
2. Reports6i
3. SQL Scripts
4. PL/SQL

A bind variable is used for the assignment of value, a lexical is the literal value.
The syntax is as follows for a bind variable :P_SEGMENT and the sytax for lexical is &L_WHERE_CLAUSE.

Here’s how you would use the two of these in a query:
1. Select * from mtl_system_items where segment1 = :p_segment
2. Select * from mtl_system_items where &l_where_clause

Here are some neat tricks with lexicals and how they can be combined with bind variables. Below we can see that a lexical can contain a bind variable. This may seem confusing but it has major implications for the performance of your query.

Good:
l_where_clause := 'segment1 = :p_segment';

Bad:
l_where_clause := 'segment1 = '''p_segment'';

Appending segment1i s a bad idea because it causes a performance issue. Every time this query is parsed it needs to generate a new explain plan. So nothing gets cached. Where as the lexical with a bind variable is much better, because the statement gets cached.

The performance issue doesn’t really rear its ugly head until it gets in a production environment or this query is being executed in some sort of batch process.

Friday, April 13, 2012

Difference between Key and Descriptive Flexfield? DFF vs KFF

Key Flexfield(Ex: Accounting Flexfield to uniquely identifies a General Ledger Account.)
1.Unique Identifier
2.Key Flexfield are stored in segment
3.For key flexfield there are flexfield Qualifier and segment Qualifier

Descriptive Flefield
1.To capture extra information
2.Stored in attributes
3.Context-sensitive flexfield is a feature of DFF. (descriptive flexfield)

Wednesday, December 2, 2009

Oracle Reports-Frequently Use SRW Functions

SRW Package is a collection of PL/SQL constructs that provide developers with a suite of built-in functions, procedures, and exceptions that can be used in any of your libraries or reports. The following lists several of these constructs, and briefly describes how Applications uses them in reports.

SRW.DO_SQL and SRW.DO_SQL_FAILURE
When it is necessary to perform data definition statements (DDL), the SRW.DO_SQL packaged procedure must be used. You cannot perform DDL statements in PL/SQL. In conjunction with this, we use the SRW.DO_SQL_FAILURE
exception which raises an error if the statement should fail.

Example
BEGIN
SRW.DO_SQL('Create table Test...');
EXCEPTION 
  when SRW.DO_SQL_FAILURE then
  .....
END;

SRW.MESSAGE
This procedure allows developers to create their own messages and return them at runtime. It takes two arguments, a message number and message text. It can be used for error handling or debugging. Applications uses this feature to standardize and share messages across reports.

Example
SRW.MESSAGE('500','First debug point');

SRW.USER_EXIT and SRW.REFERENCE
Because Applications reports commonly call user exits it is critical that Oracle Reports support such calls. To facilitate this requirement the Package offers  SRW.USER_EXIT and SRW.REFERENCE. User exits may be called from any PL/SQL interface within a report, but it must be called with SRW.USER_EXIT. Furthermore, to ensure that the value of an object passed to the user exit contains the most recently computed or fetched value, SRW.REFERENCE will add the object to the user exit dependency list.

Example
BEGIN
SRW.REFERENCE(:Currency_code);
SRW.REFERENCE(:Currency_value);
SRW.USER_EXIT('FND FORMAT CURRENCY CODE=":Currency_code"                         
               AMOUNT=":Currency_value"                        
               DISPLAY=":Currency_formatted"');
RETURN(:Currency_formatted);
EXCEPTION WHEN
SRW.USER_EXIT_FAILURE THEN
RETURN('FORMAT ERROR');
END:

Monday, November 30, 2009

Types of Value Sets

You can define several types of value sets depending on how you need your values to be checked. All value sets perform minimal checking; some value sets also check against the actual values, if you have provided any.

Navigation Path: System Administrator->Application->Validation->Set/Values

None - A value set of the type None has no list of approved values associated with it. A None value set performs only minimal checking of, for example, data type and length. Examples of such values include credit card numbers, street addresses, and phone numbers.

Independent - Use the validation type Independent when you know the allowable values ahead of time. Independent type value sets perform basic checking but also check a value entered against the list of approved values you define.

Dependent
- A Dependent value set is also associated with a list of approved values. In this case however, the values on the list can be grouped into subsets of values. Each subset of values is then associated with a value from an Independent value set. Once a value from the Independent value set has been specified, the list of values for the Dependent value set displays only the values that are approved for the value selected from the Independent value set.

In below picture, once a value from the Category value set has been specified, only the appropriate values from the Item value set are displayed.

Table - Table value sets obtain their lists of approved values from existing application tables. When defining your table value set, you specify a SQL query to retrieve all the approved values from the table.

Special - This specialized value set provides another flexfield as a value set for a single segment. Special value sets can accept an entire key flexfield as a segment value in a descriptive flexfield or report parameter.
Pair - This specialized value set provides a range flexfield as a value set for a pair of segments.

Translatable Independent - Translatable Independent value sets are similar to Independent value sets except that translated values can be displayed to the user. Translatable Independent value sets enable you to use hidden values and displayed (translated) values in your value sets. In this way your users can see a value in their preferred languages, yet the values will be validated against a hidden value that is not translated. A Translatable Independent value set can have only Translatable Dependent value sets dependent on it.
See Example: Appliances and Furniture can be displayed in two languages (Gerate and Mobel) or (Appareils and Meubles).

Translatable Dependent -Translatable Dependent value sets are similar to Dependent value sets except that translated values can be displayed to the user. Translatable Dependent value sets enable you to use hidden values and displayed (translated) values in your value sets. In this way your users can see a value in their preferred languages, yet the values will be validated against a hidden value that is not translated. Translatable Dependent value sets must be dependent on a Translatable Independent value set.
See Example: Appliances and Furniture can be displayed in two languages (Gerate and Mobel) or (Appareils and Meubles).  Microwave can be displayed in Mikrowellenherd or Four a micro-ondes.

Monday, November 9, 2009

How to Load Oracle Workflow Definition into Database

The Workflow Definitions Loader is called WFLOAD and can be found in: $FND_TOP/bin

By default it can be used the following ways.
To upload:      WFLOAD apps/pwd 0 Y UPLOAD file.wft
To force:         WFLOAD apps/pwd 0 Y FORCE file.wft
To download: WFLOAD apps/pwd 0 Y DOWNLOAD file.wft ITEMTYPE1 [ITEMTYPE2...ITEMTYPEn]
To upgrade:    WFLOAD apps/pwd 0 Y UPGRADE file.wft

You can use a concurrent program to load process definitions. Run Workflow Definitions Loader concurrent program.

The products listed below leverage Oracle Workflow for business process definition and integration.

Oracle Warehouse Builder
Oracle Warehouse Builder includes a Workflow Deployment Wizard that lets you deploy extract, transform, and load mappings to Oracle Workflow as functions within an item type. You can then use Oracle Workflow Builder to define the sequence of these functions as a workflow process. In designing the process, you can specify job dependencies between the mappings to ensure that jobs run in the proper order. You can then run the process from Oracle Workflow or schedule the process to run using Oracle Enterprise Manager.

Oracle Application Server InterConnect
The Oracle Workflow Business Event System enables Oracle Application Server InterConnect and Oracle Workflow to work together to provide a complete business process driven integration solution. With Oracle Application Server InterConnect and Oracle Workflow, you can define business collaborations across two or more applications to implement the business processes for an organization.

The Oracle Application Server InterConnect iStudio design tool automatically generates Oracle Workflow business event and subscription definitions corresponding to common view events and procedures. You can launch the Oracle Workflow home page from iStudio to review these definitions. The iStudio tool also deploys process bundles as Oracle Workflow item type definitions. These item types include starter workflow processes with Oracle Workflow event activities that correspond to Publish, Subscribe, Invoke, and Implement activities defined in iStudio. You can then launch Oracle Workflow Builder from iStudio to complete the workflow process definition by specifying the sequence of the event activities and optionally adding other activities such as notifications or functions.

For example, iStudio might generate a workflow process with two event activities, one that receives a CreatePO event and another that sends an AcceptPO event. You can then use Oracle Workflow Builder to define the business process that controls the execution of these activities. For instance, add a notification activity to send an e-mail requesting approval after the CreatePO event is received and before the AcceptPO is event is sent.

At runtime, Oracle Application Server InterConnect and Oracle Workflow communicate with each other through the Oracle Workflow Business Event System, leveraging the Oracle Advanced Queuing messaging infrastructure, to execute business processes defined across multiple applications.

Sunday, November 8, 2009

Oracle Workflow and Workflow Components

Oracle Workflow
Workflow is a business management system that automates and streamlines business process. Within and between enterprises, oracle workflow supports complete business process integration. Enables modeling, automation. Enables routing information of any type according to user defined business rules.

Workflow Process

Every Business process is represented as a workflow process. Each workflow process in turn consists of a sequences of activities. Activities Includes business events such as raising PO, includes functions such as updating requisitions details and notifications such as e-mail to manager for approval. Sequence of such activities are represented in a Workflow process to achieve a business requirement.

Sample Workflow Process


Oracle Workflow is available in Two Versions:
- Standalone version
- Embedded version
1. A standalone version of Oracle Workflow is available with the Oracle database and Oracle9i Application Server.
2. Oracle Workflow is embedded in the Oracle E-Business Suite to enforce a common set of business rules.
3. Oracle Workflow Embedded version is incorporated in applications including Enterprise Resource Planning (ERP), Customer Relationship Management (CRM), and Human Resources Management Systems (HRMS).
4. Oracle Workflow Embedded version  is leveraged by both professional applications (which are typically Forms-based applications for power users)
5. Self-service applications (which are typically HTML-based applications i expenses for expense reports processing)
6. Our discussion is confined to embedded workflow. But the concepts we discuss hold good for Standalone workflow version also.

Processing of event based workflow
On occurrence of event (such as submission of invoice for approval) Application Modules Raises invoice approval event and passes it to BES. BES triggers event subscriptions using rule functions. These event subscription in turn launches workflow process.



Oracle Workflow Architecture



Oracle workflow grouped into four parts
- Workflow Development Client
- Oracle Server
- Application Server
- End-User Client

Workflow Development Client: The development client is a PC running Windows 95, Windows 98, Windows 2000, or Windows NT 4.0 or higher. This platform is used to create and modify Oracle Workflow process definitions.
Development tool/utilities used by workflow developers to define workflow process are
-Workflow Builder
-Workflow Definitions Loader
-Workflow XML Loader

Oracle Server: The Oracle Server platform is the Oracle RDBMS. This platform hosts the business application integrated with Oracle Workflow, the Workflow Engine, Business Event System, Notification System, and directory services.
Components that reside on Oracle Server are
-Workflow Engine
-Notification System
-Directory Services
-Business Event System (for Event Based Workflow)

Application Server: The application server is the environment outside of the RDBMS. This environment includes ancillary services such as the Oracle9i Application Server (Oracle9iAS) as the web server, and the Notification Mailer.
End-User Client: The end-user client is the workstation or PC that an end user uses to perform daily tasks. This client includes browser support for reviewing and responding to notifications in the Notification Worklist, the Oracle Workflow Monitor to view workflow process, as well as mail applications for reviewing and responding to notifications by e-mail.
Components that reside on Client and accessible using browser are
-Notification Worklist
-Workflow Monitor

Workflow Process and Process Definition

A process definition is composed of activities and the relationship between them that accomplish workflow process. Workflow process is initiated when an application calls a set of Oracle Workflow Engine APIs. Workflow engine invokes “Start” activity or “Receive” Event of a Workflow Process.

1.Each workflow process is identified by unique Item Type at database level(such as Payables Invoice Approval Workflow Item type is APINV).
2.Each workflow process is saved in a single flat file. Payables Invoice Approval Workflow process definition is stored in apfiawie.wft flat file.
3.After opening the workflow process definition in workflow builder. Right click on Item Type (in below picture it is AP Invoice) and select properties.
4.This displays Item type internal name and display name.
5.Workflow Process consists of Process Activities (In this slide we can note two process ‘Invoice Approval -  Main and Send Notifications)


Process Activity
Most important activity in workflow process is a  process activity. Process activity represents a collection of other activities (Function, Event, Notification). Icons/Nodes represents activities and Arrow corresponds to transition from one activity to other. Process Diagram displays Process activity. In this diagram we can see Invoice Approval – Main process activity comprising “Receive Invoice”, “Check if matched to PO”, “Send Notifications” etc.,


Function Activity
A function activity calls a PL/SQL stored procedure or some external program to perform an automated function in process activity. Select Activity Icon from process diagram. Right click on it and select properties. Check the first tab page to identify the activity type. Here it is a “Function” activity.

Event Activity
An event activity can either Receive, Raise, or Send a business event. This can be noted from “Event Action” field. We can select Icon using “Browse” button. Event Activity retrieves the event name, event key, and event data as specified in the event details (tab page). The event details can be dynamically determined at runtime.

-A Receive event activity can be marked as a Start activity for a process, meaning it is always enabled to receive events. Alternatively, a Receive event activity can be placed within the process, so that it is only enabled to receive events
-A Raise event activity retrieves information about the event and raises the event to the Business Event System, which will then execute subscriptions to the event.
-A Send event activity retrieves the event name, event key, event message, outbound agent, and inbound agent, as specified in the node’s event details.

Notification Activity
When the workflow engine reaches a notification activity, it issues a Send( ) API call to the Notification System to send the message to an assigned performer. In this notification activity, Message being sent can be found in the Message field. This field holds the message content name. (In below picture Message content is Identified by name “Request Approver”). When a performer responds to a notification activity, the Notification System processes the response and informs the workflow engine that the notification activity is complete so that it can continue processing the next eligible activity.

In Notification Activity, you specify the performer (I.e. receiver) of a notification in “Node” tab page in Performer section. You can either designate the performer to be a specific role or an type attribute that dynamically returns the name of a role.


Attributes
Attributes Acts as a global variable that can be referenced or updated by any activity within a process. Applications packages can reference and set item type attributes using the Oracle Workflow Engine APIs during runtime of workflow process. Attributes provide information that will need in a notification message. Can Right Click on Attribute in navigation Tree and select Properties. This displays internal name and type.


Wfstatus.sql
Wfstatus.sql is provided along with workflow product or oracle application. We can find it in $fnd_top/sql folder. We need to run this script from sql*plus. Complete list of activities executed for workflow process instance are displayed. Spooling the result to text file makes it easy for customer to send details of workflow process instance to support.

wfstatus.Sql script execution:          
- Change to the $FND_TOP/sql directory
- Connect to sqlplus as apps
- spool
- Run the following command
  @wfstatus APINV  57936_1 (Input parameters are Item_type and Item_key)
- spool off
- Open to view details of workflow Item

This is the output report of wfstatus.sql



Workflow Item section consists of Process Instance details. One record exists for combination of Item Type and Item Key. If no record is selected means workflow process is not launched and other sections of report will not have any information. Please note correct Item Type and Item Key needs to provided. Otherwise we will not get any data in workflow Item section.

Activity Statuses Section provides Activities executed in Activity column. Generally value in this column has two parts separated by forward slash “/”. First Part indicates the process activity and Second part indicates activity within that process activity. In this example ‘Invoice Approval Main” is the Process activity and “Check if matched to PO” is the activity within that process.

Status Column Provides the status of activity.

Result column provides Return value on completion of that activity.


Errored Activities section provide details of activities that got Errored while executing workflow process.
Attribute Values provide values of variables that are being used while executing  workflow process.
Related Posts Plugin for WordPress, Blogger...