-
1. Re: how to refresh text_area item during PL/SQL process
Scott Wesley Jun 12, 2019 7:36 AM (in response to Fabrizio Delli Priscoli)Are you talking about a dynamic action or a process on page submit? Because we'd be looking at different things.
Page submit would be looking at the source fields, or this property for DAs
Submit sends your value from browser to DB, for PL/SQL processing. Return sends any updated session state value back to the browser field.
Since you have apex_error, I'm guessing page submit? If so, maybe you need to detail your scenario more.
-
2. Re: how to refresh text_area item during PL/SQL process
Fabrizio Delli Priscoli Jun 12, 2019 7:45 AM (in response to Scott Wesley)No, I have a button in which there is a javascript code with apex_confirm message and a value.
My PL/SQL process is under process tab and is execute when request = value (the value that is passed form apex_confirm).
-
4. Re: how to refresh text_area item during PL/SQL process
Fabrizio Delli Priscoli Jun 12, 2019 8:19 AM (in response to Scott Wesley)I have an item a textarea item, called 120_MY_TEXTAREA where I want to display every step of my process
-
5. Re: how to refresh text_area item during PL/SQL process
Scott Wesley Jun 12, 2019 8:45 AM (in response to Fabrizio Delli Priscoli)Just confirming, since general convention prefixes all page items with P.
So you need to assess how that's being sourced, and if there are any computations.
-
6. Re: how to refresh text_area item during PL/SQL process
Fabrizio Delli Priscoli Jun 12, 2019 8:48 AM (in response to Scott Wesley)I assign value to this textarea item during process and values that I assign to this textarea item are displayed only when the process is finished, while I want to "force" refreshing of the textarea item directly from process, when a call to my database package is finished and before I make a new call to database package.
-
7. Re: how to refresh text_area item during PL/SQL process
fac586 Jun 12, 2019 9:21 AM (in response to Fabrizio Delli Priscoli)Fabrizio Delli Priscoli wrote:
I assign value to this textarea item during process and values that I assign to this textarea item are displayed only when the process is finished, while I want to "force" refreshing of the textarea item directly from process, when a call to my database package is finished and before I make a new call to database package.
This is effectively the same scenario as that in your previous question: show a confirmation message in a process
Communication between server programs and the client browser during page accept processing is not supported out of the box. This type of push notification requires the use of WebSockets (which can be implemented using Node.js: https://jsao.io/2015/02/real-time-data-with-node-js-socket-io-and-oracle-database/) or Server Sent Events (which has significant compatibility issues thanks to one particular browser vendor...)
-
8. Re: how to refresh text_area item during PL/SQL process
Fabrizio Delli Priscoli Jun 12, 2019 9:22 AM (in response to fac586)ok, thanks a lot. I will look your document.
-
9. Re: how to refresh text_area item during PL/SQL process
fac586 Jun 12, 2019 9:26 AM (in response to Fabrizio Delli Priscoli)Fabrizio Delli Priscoli wrote:
I assign value to this textarea item during process and values that I assign to this textarea item are displayed only when the process is finished, while I want to "force" refreshing of the textarea item directly from process, when a call to my database package is finished and before I make a new call to database package.
How long does this processing take?
-
10. Re: how to refresh text_area item during PL/SQL process
Fabrizio Delli Priscoli Jun 12, 2019 9:31 AM (in response to fac586)about 20 minutes
-
11. Re: how to refresh text_area item during PL/SQL process
fac586 Jun 12, 2019 8:34 PM (in response to Fabrizio Delli Priscoli)Fabrizio Delli Priscoli wrote:
about 20 minutes
There are two problems with that:
- There is a strong possibility that the request will be timed out, leaving the user with an error or a blank page.
- Users generally don't want to be sitting waiting for something to happen for 20 seconds, let alone 20 minutes.
I have on a page a textarea item in which I want to show all the points of my process.
I have a button that recall a page process, a PL/SQL code process, in which I make many recalls to a database package.
What I want is that between a package call I assign a value to my textarea item and it is refreshed.
Is it possible ? Or in case is not possible is there a way to achieve this?
Thanks all for collaboration,
Fabrizio
Here is example of my PL/SQL page process:
:120_MY_TEXTAREA := 'FIRST CALL TO PACKAGE'||chr(10);
MY_PACKAGE.MY_PROCEDURE_1(:p120_year,:p120_month);
if SQLCODE = 0 then
:120_MY_TEXTAREA := :120_MY_TEXTAREA||'SECOND CALL TO PACKAGE'||chr(10);
MY_PACKAGE.MY_PROCEDURE_2(:p120_year,:p120_month);
else
apex_error.add_error(p_message =>'ERROR OCCURS: '||SQLERRM,p_display_location =>apex_error.c_on_error_page);
end if;
and so on....
Instead of executing these programs directly from APEX, I would use the following alternative approach to perform the required processing in the background as a scheduled job, enabling users to continue working in the application whilst it is running.
- The package API methods involved are defined as scheduler programs, and the overall workflow implemented using a chain.
- The after submit page process creates an instance of the job scheduled to start immediately, and provides the user with the unique job name.
- Job progress and status is tracked using the appropriate data dictionary scheduler views:
- Users can be emailed when the job is completed or fails.
- The application can provide feedback to users on the progress and status of their jobs in various ways:
- Reports
- Conditionally displaying Alert regions on page show
- Icons and badges in menu and navigation bar entries