ziopex / plsql-utils

Automatically exported from code.google.com/p/plsql-utils
0 stars 0 forks source link

Compilation error on APEX_UTIL_PKG after upgrade to Apex 4.2 #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In procedure setup_apex_session_context, the following line:

l_security_group_id := 
apex_application.get_current_flow_sgid(apex_application.g_flow_id);

raises the following compilation error after upgrading to Apex 4.2:

Error(335,45): PLS-00302: component 'GET_CURRENT_FLOW_SGID' must be declared

Don't know why this function was removed. There is a comment in the Apex 4.2 
WWV_FLOW package which confirms the removal:
--      pawolf    03/22/2012 - Removed get_current_flow_sgid, Renamed 
convert_flow_alias_to_id to get_application_id and moved 
convert_page_alias_to_id to wwv_flow_page

Original issue reported on code.google.com by jeffrey....@jk64.com on 18 Oct 2012 at 12:16

GoogleCodeExporter commented 8 years ago

Original comment by thehunge...@gmail.com on 31 Oct 2012 at 4:31

GoogleCodeExporter commented 8 years ago
See this thread:

https://forums.oracle.com/forums/thread.jspa?threadID=2455828&tstart=0

Could you check if any of the new APIs mentioned there work? As a last resort, 
I guess the "select workspace_id from apex_applications" method should always 
work.

Original comment by thehunge...@gmail.com on 3 Nov 2012 at 9:05

GoogleCodeExporter commented 8 years ago
apex_custom_auth.get_security_group_id seems to compile without problem. I 
don't have a test case to determine whether it is correct or not, I don't use 
this procedure myself. I tried running it but it raises ORA-20000: Session not 
valid; so it doesn't actually get to that line of code in my tests.

procedure setup_apex_session_context (p_application_id in number)
as
  l_security_group_id            number;
begin

  /*

  Purpose:      setup Apex session context

  Remarks:      required before calling packages via the URL, outside the Apex framework

  Who      Date        Description
  ------  ----------  --------------------------------
  MBR     20.10.2009  Created

  */

  apex_application.g_flow_id := p_application_id;

  if wwv_flow_custom_auth_std.is_session_valid then

    apex_custom_auth.set_session_id(apex_custom_auth.get_session_id_from_cookie);
    apex_custom_auth.set_user(apex_custom_auth.get_username);

    --l_security_group_id := apex_application.get_current_flow_sgid(apex_application.g_flow_id);
    l_security_group_id := apex_custom_auth.get_security_group_id;
    wwv_flow_api.set_security_group_id(l_security_group_id);

  else
    raise_application_error (-20000, 'Session not valid.');
  end if;

end setup_apex_session_context;

Original comment by jeffrey....@jk64.com on 3 Nov 2012 at 9:47

GoogleCodeExporter commented 8 years ago
Rewritten using the latest APIs (which are also compatible with Apex 4.1).

Original comment by thehunge...@gmail.com on 17 Feb 2013 at 9:21