Deferred Workflow Context Issues - PowerPoint PPT Presentation

About This Presentation
Title:

Deferred Workflow Context Issues

Description:

Oracle Workflows were reported to: Not updating records with the correct Row Who data Some customizations don t seem to have the Operating ... Order Management ... – PowerPoint PPT presentation

Number of Views:141
Avg rating:3.0/5.0
Slides: 18
Provided by: Roge150
Category:

less

Transcript and Presenter's Notes

Title: Deferred Workflow Context Issues


1
Deferred Workflow Context Issues
  • Collaborate07
  • Sunday April 15, 215 430Lagoon H

2
Deferred Workflow Context Issues
  • Issue Summary
  • Oracle Database Session Context
  • Item Type Selector
  • Order Management Example

3
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 dont seem to have the
    Operating Unit (ORG_ID) set properly

4
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 usingFND_CLIENT_INFO
    .Set_Org_Context(to_char(l_org_id))

5
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.

6
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.

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

8
Workflow Development Guide
  • Developers Guide, Release 2.6.3,Part No.
    B1028402
  • 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

9
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.

10
RUN
  • This mode returns the Item Types process name to
    be run

11
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

12
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

13
Order Management
  • The selector functions areHeader
    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.

14
Order Management (cont)
  • The selector functions areHeader
    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.

15
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.

16
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

17
Order Management Summary
  • In summary, dont 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
Write a Comment
User Comments (0)
About PowerShow.com