I'm attempting to run multiple pl/sql blocks within a Dynamic Action, providing real-time feedback to the user through a modal dialog displaying the current status.
Here is an example of what I am trying to achieve:
Processing Step 1...
/*Run pl/sql code for step 1*/
Processing Step 2...
/*Run pl/sql code for Step 2*/
and so forth...
While both the pl/sql and javascript codes work individually, when combined in a Dynamic Action with the following sequence:
1 - Execute Javascript
2 - Execute PL/SQL block /* With wait for result option checked*/
3 - Execute Javascript
4 - Execute PL/SQL block
The status dialog does not appear, however the pl/sql blocks execute without any issues.
I suspect this may be related to javascript not being multithreaded, so I attempted moving the pl/sql blocks to application processes and executing them as ajax calls like so:
function something(){
var get;
var result = 0;
updateStatus('Running Step1');
get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=P6_STEP_1',0);
result = get.get();
if(result > 0){
updateStatus('Running Step 2');
get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=P6_STEP_2',0);
result = get.get();
}
closeStatusDialog();
}
However, even with this change, the processes execute correctly but the dialog still does not show up. Finally, I added a setTimeOut
function to each call, as follows:
function something(){
var get;
var result = 0;
updateStatus('Running Step1');
get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=P6_STEP_1',0);
result = setTimeOut(get.get(),500);
if(result > 0){
updateStatus('Running Step 2');
get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=P6_STEP_2',0);
result = setTimeOut(get.get(),500);
}
closeStatusDialog();
}
Despite these changes, the issue persists. What steps can I take to ensure proper functionality?.
I have reviewed the browser console and no exceptions are being thrown, likewise with the pl/sql blocks.