Question
IBM
CN
Last activity: 16 Mar 2024 11:26 EDT
Required (mandatory) field in a section is skipped validation in case network response slow.
Required (mandatory) field in a section is skipped validation in case network response slow.
Scenario:
In a section, after a radio button (or drop down list) A is selected, its "on change" event is triggered and make another field text field (or other type) B in same section visible. Also, as B is always required (mandatory), so the section can not be submit before B is input (selected).
However, sometimes, due to network issue, after A is selected, before B is displayed, user click submit button, then the section is submitted with empty B.
It's quite surprise that Pega can not guarantee the correct sequence in event chain of section.
Another scenario is similar: when a section is loaded, due to network issue, before some required fields displayed, the case can be submitted.
We have met above problems several times in our dev or prod env.
Pls kindly advise any solution.
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 16 Mar 2024 11:26 EDT
Eclatprime Digital Pvt Ltd
AU
This issue might be related to busy indicator not getting displayed when network is slow.That may be the reason you are still able to submit before the refresh completes.
Verify if you have any custom code for busy indicator in user work form.
Include pega_ui_busyIndicator.js in the Perform harness.
You might have to call a JS function from your onchange event like below to display busy indicator .You can have the JS function in any text file embedded in harness or in userworkform.
var objBusyInd = null; function busyIndShow(){ if (!objBusyInd) { objBusyInd = new pega.ui.busyIndicator("",true); } objBusyInd.show(); }
Few articles on the same
https://support.pega.com/question/not-able-see-busy-indicatorloading-symbol-click-link-section
https://support.pega.com/question/busy-indicator-loading-icon-not-working-when-i-opening-work-object
Maantic Inc
IN
@MaxonL16591286 Please go ahead with validation rule for server side validation for this kind of scenario if client side validation fails. Hope this helps.
IBM
CN
Do you mean do validation in the post-processing data transform of the flow action?
However, we have a lot of case types depend on the "required" setting in sections. We can not add validation for all of them.
Could you dig deeply to share a general solution? Or report to Pega developer as a defect ( I think it's a major defect and may cause serious business problem).
Maantic Inc
IN
@MaxonL16591286 for a holistic solution i would suggest check the logs Pega Alert log if you are getting query timeouts or long running query . Pega005 logs. Network slowness should not stop validation to that extent rather focus on how the coding is done and approach from a ground up. Thats why pega has best practices to follow if we do random code and expect pega to work in estimated manner it seldom happens. Suggestion check logs ALERT and pega. if possible clear cache/ Temp folders and restart server see if issue exists.
IBM
CN
first, there's no "getting query timeouts or long running query" happen. In that scenario, only 2-3 seconds delay before displaying a "required" field, instead of long waiting. In these 2-3 seconds, user may submit the section without any prevention.
more, about "Network slowness should not stop validation to that extent rather focus on how the coding is done and approach from a ground up.", but (1) actually the "Network slowness " has stopped the expected validation for some times in our env. (2) No coding needed for "required" fields, it's a ootb Pega feature, isn't it? If any coding needed here, could you advise?
and, about "if we do random code and expect pega to work in estimated manner it seldom happens. ", I have no idea about what's "random code". Just I expect Pega to prevent user submit without leaving "required" fields empty, in any scenario (include Network slow), isn't it reasonable?
I do not think a slight network delay cause logic error in pega show the robust of pega as a common platform.
If the "required" field validation has such limitation in network slow, could you show me any document/guidance from pega about this?
Updated: 14 Mar 2024 3:08 EDT
IBM
CN
Obviously, the correct sequence of events handling should be as below:
A is selected ---> A's "On Change" event is triggered ---> A's "On Change" event run and ends (so that section is refreshed and B become visible ) ---> Handle other event e.g. submit button is clicked.
but the sequence may become below when network slights slow:
A is selected ---> A's "On Change" event is triggered ---> A's "On Change" event running (not yet end) ---> Handle other event e.g. submit button is clicked.
So it cause the mentioned logic problem.
In the 2nd scenario, expect Pega surely need postpone the submit button click event handling until all previously triggered events end.
Accepted Solution
Updated: 16 Mar 2024 11:26 EDT
Eclatprime Digital Pvt Ltd
AU
This issue might be related to busy indicator not getting displayed when network is slow.That may be the reason you are still able to submit before the refresh completes.
Verify if you have any custom code for busy indicator in user work form.
Include pega_ui_busyIndicator.js in the Perform harness.
You might have to call a JS function from your onchange event like below to display busy indicator .You can have the JS function in any text file embedded in harness or in userworkform.
var objBusyInd = null; function busyIndShow(){ if (!objBusyInd) { objBusyInd = new pega.ui.busyIndicator("",true); } objBusyInd.show(); }
Few articles on the same
https://support.pega.com/question/not-able-see-busy-indicatorloading-symbol-click-link-section
https://support.pega.com/question/busy-indicator-loading-icon-not-working-when-i-opening-work-object
IBM
CN
@SUDIPTA SUR many thanks for the valuable info. Let me further check and revert.
IBM
CN
from your reply, seems we need programmatically to show (and/or close) the busy indicator in every on change event that need handled in synchronize?
Is there any common system setting the enable this feature so that we need not update many change events?
Thanks.
Eclatprime Digital Pvt Ltd
AU
@MaxonL16591286 Ideally busy indicator appears automatically for long running processes, AJAX calls etc. In your specific scenario it's not appearing hence the custom code. There is no settings for this configuration
IBM
CN
Sorry, may i know what does this mean: "In your specific scenario it's not appearing hence the custom code"
Our "on change" event actions are noting special, just update some indicators (to set another field's visibility condition to true) and then refresh section.
It's not a long running processes, AJAX calls etc.
For such "quick" action, any way to let the busy indicator appears / disappear automatically?