deferred workflow context issues l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Deferred Workflow Context Issues PowerPoint Presentation
Download Presentation
Deferred Workflow Context Issues

Loading in 2 Seconds...

play fullscreen
1 / 17

Deferred Workflow Context Issues - PowerPoint PPT Presentation


  • 150 Views
  • Uploaded on

Deferred Workflow Context Issues. Collaborate07 Sunday April 15, 2:15 – 4:30 Lagoon H. Deferred Workflow Context Issues. Issue Summary Oracle Database Session Context Item Type Selector Order Management Example. Issue Summary.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Deferred Workflow Context Issues' - faris


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
deferred workflow context issues

Deferred Workflow Context Issues

Collaborate07

Sunday April 15, 2:15 – 4:30Lagoon H

deferred workflow context issues2
Deferred Workflow Context Issues
  • Issue Summary
  • Oracle Database Session Context
  • Item Type Selector
  • Order Management Example
issue summary
Issue Summary

This presentation is follow up on an Oracle E-Business Suite Workflow issue reported by several WF SIG members at the last WF SIG meeting at Oracle OpenWorld.

Oracle Workflows were reported to:

  • Not updating records with the correct Row Who data
  • Some customizations don’t seem to have the Operating Unit (ORG_ID) set properly
oracle database session context
Oracle Database Session Context

There are two primary groups of data:

  • Row Who Data

Set using: FND_GLOBAL.Apps_Initialize(l_user_id, l_resp_id, l_resp_appl_id);

  • Operating Unit (ORG_ID)Set using:FND_CLIENT_INFO.Set_Org_Context(to_char(l_org_id));
how is database session info set
How is Database Session Info Set

If the workflow is running in real time (non-deferred mode) then the database session info is inherited from the users database session.

The workflow is running in this users database session.

deferred workflows db session
Deferred Workflows DB Session
  • Deferred workflows are run by the Workflow Background Process.
  • The Workflow Background Processes run many different Item Type Processes for many different users and operating units.
  • So how is this suppose to work….
item type selector
Item Type Selector

On the Item Type Properties form there is a field for Selector.

workflow development guide
Workflow Development Guide

Developer’s Guide, Release 2.6.3,Part No. B10284–02

Page 3-5, Item Type Selector Function

Used to:

  • Auto select the runnable process for a given Item Type
  • As a Call Back function to set database session context for deferred activities
  • Page 6-13, Standard API for an Item Type Selector or Callback Function
how does this work
How does this work

Oracle Workflow calls the selector/callback function with the following commands:

  • RUN: to select the appropriate process to start
  • TEST_CTX: to determine if the current item type context information is correct before executing a function
  • SET_CTX: to establish any context information for an item type and item key combination that a function activity in the item type needs in order to execute. Automatically during switches in Item Type/Item Key.
slide10
RUN
  • This mode returns the Item Type’s process name to be run
test ctx
TEST_CTX
  • The Selector Function is first called in this mode.
  • It is the developers responsibility to determine if the database session info is set correctly
  • If the database session is set correctly return TRUE
  • If the database session is not set correctly return FALSE
  • The call Selector Function in SET_CTX mode
set ctx
SET_CTX
  • It is the developers responsibility to correctly set the database session information.
  • The ideal situation is to store session context information in Workflow Attributes.
  • Some modules derive the session context from the source document, (ie. Order Header, Requisition Header, etc.).
  • Again it is up to the development team to decide how/when to do this
order management
Order Management

The selector functions are:Header = OE_STANDARD_WF.OEOH_SELECTORLine = OE_STANDARD_WF.OEOL_SELECTOR

Within these functions there are if statements which will avoid setting the database session unless the PL/SQL global variable, OE_STANDARD_WF.G_RESET_APPS_CONTEXT is set to true.

order management cont
Order Management (cont)

The selector functions are:Header = OE_STANDARD_WF.OEOH_SELECTORLine = OE_STANDARD_WF.OEOL_SELECTOR

Within these functions there are if statements which will avoid setting the database session unless the PL/SQL global variable, OE_STANDARD_WF.G_RESET_APPS_CONTEXT is set to true.

order management cont15
Order Management (cont)

I have not found exactly how this global variable is being set. However, Oracle Support did say that the Row Who data will not be correct unless the Workflow Background Process is run individually for each of the OM Item Types: OEOH & OEOL

That is impractical at most sites since the there are 50-100 active Item Types, each would require their own Workflow Background Process.

order management cont16
Order Management (cont)
  • ER 5303011workflow background process not setting last_updated_by to correct user
  • ER 4060422request workflow background process can be run with category ranges
order management summary
Order Management Summary
  • In summary, don’t rely on the database context information being set properly on deferred OM Workflow Processes
  • This translates into inaccurate Row Who data in OM
  • Warn your auditors that this is a known Oracle E-Business Suite deficiency