KSK
Well Known Member
Hi all,
I have a Push button (“Recalculate Price”) which has a Heavy Code, The approx execution time of “Recalculate Price” push button is 20 seconds.
Issue: users trying to hit the push button for multiple times (say 10 times rapidly) and the application is getting overloaded and hanged for some time (for executing the push button code for 10 times-synchronously).
We want to restrict the user to click ‘Recalculate Price’ multiple times and tried with the below logic.
Recalculate Price (Push button Code)
---------------------------------------------------------------------------------------------------------------
Event Rule –Button Clicked.
Disable Control (Recalculate Price)
Other logic //This logic will take 20 seconds to execute.
Event Rule- Post button clicked
Enable Control (Recalculate Price)
---------------------------------------------------------------------------------------------------------------
Expectation: Once user clicked on “Recalculate Price” .he should wait for 20 sec and not allowed to click the “Recalculate Price” button for 20 seconds (I,e until the first click of entire button code is executed).
Result: Disable Control (Recalculate Price) system function code is not getting executed immediately after the line of execution. In the front end “Recalculate Price” is getting disabled after 20 seconds... So still the user able to click the push button for multiple times.
Please help me on the solution .Thanks in advance.
Thanks,
SivaKumar K
I have a Push button (“Recalculate Price”) which has a Heavy Code, The approx execution time of “Recalculate Price” push button is 20 seconds.
Issue: users trying to hit the push button for multiple times (say 10 times rapidly) and the application is getting overloaded and hanged for some time (for executing the push button code for 10 times-synchronously).
We want to restrict the user to click ‘Recalculate Price’ multiple times and tried with the below logic.
Recalculate Price (Push button Code)
---------------------------------------------------------------------------------------------------------------
Event Rule –Button Clicked.
Disable Control (Recalculate Price)
Other logic //This logic will take 20 seconds to execute.
Event Rule- Post button clicked
Enable Control (Recalculate Price)
---------------------------------------------------------------------------------------------------------------
Expectation: Once user clicked on “Recalculate Price” .he should wait for 20 sec and not allowed to click the “Recalculate Price” button for 20 seconds (I,e until the first click of entire button code is executed).
Result: Disable Control (Recalculate Price) system function code is not getting executed immediately after the line of execution. In the front end “Recalculate Price” is getting disabled after 20 seconds... So still the user able to click the push button for multiple times.
Please help me on the solution .Thanks in advance.
Thanks,
SivaKumar K