Forum Stats

  • 3,769,600 Users
  • 2,252,990 Discussions
  • 7,875,116 Comments

Discussions

Setting complete page into same session in APEX

Sai Sandeep
Sai Sandeep Member Posts: 96 Blue Ribbon
edited Aug 24, 2018 7:15AM in APEX Discussions

Hi All,

Greetings for the day

I am trying to convert one Oracle form application into APEX, where i got one scenario related to Sessions.

here is the scenario in Forms: It has one button "Btn" on click of Btn below actions will performed.

1. Start_Action (PLSQL Procedure calling)

2. Call Child Form (new form opens, we can update/insert/delete data)

3. Continue_Action (PLSQL Procedure calling)

Here are some global temporary tables involved here.so it is completely session related.

Now issue in APEX is, i have written code in Javascript on click of Btn as below:

1. Calling Process (Start_action) to perform Start_Action ("in start_action process calling same PLSQL Procedure")

2. Navigating child page  this page have close button where i am returning back to Parent page,

3. Calling another Process (Continue_action) to perform Continue_Action ("in continue_action process calling same PLSQL Procedure")

But it is not performing expected result.

what i found is, in Oracle Forms is tightly coupled with Oracle session and it is completely one session. so, there is no issues coming even global temporary table involved.

where as, in APEX each process holds its own session. so, Global temporary tables concept is not working.

My Question is, is there any way to set complete page into same session in APEX.? if not, can you provide some ideas/suggestions to achieve this...!

Regards,

Sai Sandeep.

Answers

  • Neil Clare
    Neil Clare Member Posts: 257 Silver Badge
    edited Aug 24, 2018 4:27AM

    Apex, like other web based applications, is stateless, which means you cannot rely on session values.

    For this reason, temporary tables don't work.

    The Apex equivalent is collections, accessed via the APEX_COLLECTION package and APEX_COLLECTIONS view.

    Sai Sandeep
  • fac586
    fac586 Senior Technical Architect Member Posts: 20,114 Red Diamond
    edited Aug 24, 2018 5:56AM
    Sai Sandeep wrote:Hi All,Greetings for the day I am trying to convert one Oracle form application into APEX, where i got one scenario related to Sessions.here is the scenario in Forms: It has one button "Btn" on click of Btn below actions will performed.1. Start_Action (PLSQL Procedure calling)2. Call Child Form (new form opens, we can update/insert/delete data)3. Continue_Action (PLSQL Procedure calling)Here are some global temporary tables involved here.so it is completely session related.Now issue in APEX is, i have written code in Javascript on click of Btn as below:1. Calling Process (Start_action) to perform Start_Action ("in start_action process calling same PLSQL Procedure")2. Navigating child page this page have close button where i am returning back to Parent page,3. Calling another Process (Continue_action) to perform Continue_Action ("in continue_action process calling same PLSQL Procedure")But it is not performing expected result.what i found is, in Oracle Forms is tightly coupled with Oracle session and it is completely one session. so, there is no issues coming even global temporary table involved.where as, in APEX each process holds its own session. so, Global temporary tables concept is not working.My Question is, is there any way to set complete page into same session in APEX.? if not, can you provide some ideas/suggestions to achieve this...!

    It is impossible to use global temporary tables as described in APEX. Connect pooling and frequent implicit commits rule out the use of both session- and transaction-level GTTs.

    The processing could be rewritten based on APEX collections instead of GTTs, or the existing GTT-based procedures could be called asynchronously as scheduled jobs (note that any data in the GTTs would not be available to the APEX application).

  • Sai Sandeep
    Sai Sandeep Member Posts: 96 Blue Ribbon
    edited Aug 24, 2018 5:39AM

    Hi @fac586,

    can you please brief a bit more details about ..

    or the existing GTT-based procedures could be called asynchronously as scheduled jobs (note that any data in the GTTs would not be available to the APEX application).

    Regards,

    Sai Sandeep.

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,114 Red Diamond
    edited Aug 24, 2018 5:55AM
    Sai Sandeep wrote:can you please brief a bit more details about .. or the existing GTT-based procedures could be called asynchronously as scheduled jobs (note that any data in the GTTs would not be available to the APEX application).

    Forget it. On re-reading the question it is clear that there are dependencies on the GTT data at all stages that cannot be accommodated outside of a single session.

  • Sai Sandeep
    Sai Sandeep Member Posts: 96 Blue Ribbon
    edited Aug 24, 2018 6:07AM

    Hi,

    It is clear, can you give some solutions to achieve this in APEX.

    Regards,

    Sai Sandeep

  • Pierre Yotti
    Pierre Yotti Member Posts: 4,040 Bronze Crown
    edited Aug 24, 2018 6:22AM

    Hi,

    regarding your requirements, i can understand that step1 depend of step 2 and step2 of step 3 and vis  versa. Right?

    That is how i will try to make it works for you:

    You can use  a APEX Collection(https://docs.oracle.com/database/121/AEAPI/apex_collection.htm )

    and a Wizard(https://apex.oracle.com/pls/apex/f?p=48346:1208 )

    Wizard is not a must. But collection  fit in your use case, because the Data will be available just for that session. No need to use JS here.

    1- Create a Wizard where in the first step you can run the procedure

    2- in the Second Step you can fill the Form(Update,insert, save)

    3- Go to step 3 where you can perform the same procedure again. Boom it will works

    hope that help

    Regards

  • Sai Sandeep
    Sai Sandeep Member Posts: 96 Blue Ribbon
    edited Aug 24, 2018 6:25AM
    Alli Pierre Yotti

    I can not use wizard here.

  • Pierre Yotti
    Pierre Yotti Member Posts: 4,040 Bronze Crown
    edited Aug 24, 2018 6:31AM

    Hi,

    Ok, than is not a problem. As i said Wizard is not a must. But in any case APEX Collection will help. Is not is?

    Best case is, if you can demonstrate in on online APEX(apex.oracle.com) and we will look and try to make it works

    Regards

  • Sai Sandeep
    Sai Sandeep Member Posts: 96 Blue Ribbon
    edited Aug 24, 2018 7:15AM

    Sure...!

    I will let you know, once i am up in website.

This discussion has been closed.