Question
Wipro
US
Last activity: 25 Sep 2015 13:23 EDT
Asynchronous Serverside validation
Hi, we are using Pega 7.1.8 and wondering how to do asynchronous serverside validation (no refresh section). Here is the the example. We have a section with 4 properties and one of the properties on change event i need to call an activity which performs some validation and WITHOUT refreshing entire section i need to show only red X to that property.On the actions tab, added events like call activity and do postvalue options but the validation error is not showing on the screen. If I have to write a script, Pega has wrapped the property IDs. What is the best way of doing it?
FYI...This behavior is expected for more than 20 properties and we dont want to create a separate section for each property
Sri.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems
US
>>> there are complex validation scenarios on server side. So I don't want to refresh the section
You can have sections within sections. So it should be possible to have your expensive-to-validate items on an outer section, and include an easy-to-validate item on an inner section so that when it does its "round trip" to the server, the expensive items don't get validated.
/Eric
Pegasystems Inc.
IN
Hi Sri,
Since you need to do a validation and show a cross mark kinda thing , i think ( though I am not sure ) getting it done WITHOUT refreshing entire section is not possible.
If screen refresh is the only thing that you need to stop then one option may be is to consider Client Side validation . This help article talks about this " https://community.pega.com/sites/default/files/help_v718/procomhelpmain.htm format validation
Wipro
US
Thanks for the update. In my case client side validation is not possible as there are complex validation scenarios on server side. So I don't want to refresh the section but only REFRESH ELEMENT or that property.Seeking some advice.
Sri.
Pegasystems Inc.
IN
In your activity set Param.ReloadRequired to false.it can restrict refresh the section ! But you might not see the red cross mark as Eric pointed out !
Pegasystems
US
The refresh-section action should still be ok in this situation. Use "refresh on change" . I think this is still "synchronous" not "asynchronous". If it were truly "asynchronous" then you wouldn't be guaranteed to even see the red X before submitting the form since the asynchronicity might take longer than the submit. /Eric
Wipro
US
I agree. But refresh section would refresh all other properties which will hit other validations as there are dependencies in properties. We dont want that to happen as there are complex validations at server side. I am looking for onchange event to refresh only that element/property not entire section.
Sri.
Pegasystems Inc.
US
This is probably overkill and no the way we advise people to build their UI because there are performance and maintenance trade-offs, but you can create a set of sections to segregate the properties with different validation conditions.
The primary section can include the additional sections, each with their own validation/change/refresh logic.
Updated: 25 Sep 2015 9:59 EDT
Pegasystems Inc.
US
And I just saw that Eric recommended the same thing. It is helpful if you mark questions as answered if they have been resolved.
Wipro
US
Thanks for the udpate. But the the original requirement of refreshing single property with AJAX was the requirement and i think only way to do it is create sections with single properties. but there are 20+ properties we have in this pattern and creating 20 or more sections with one property each is something we might have to do. But it would be great if pega product team can consider as enhancement request to refresh the cell (which exists today for grid rules).
Sri.
Pegasystems Inc.
JP
ccould you share your use-case and your thinking behinde your decision of "using cell level refresh is the best way" to solve the problem?
Accepted Solution
Pegasystems
US
>>> there are complex validation scenarios on server side. So I don't want to refresh the section
You can have sections within sections. So it should be possible to have your expensive-to-validate items on an outer section, and include an easy-to-validate item on an inner section so that when it does its "round trip" to the server, the expensive items don't get validated.
/Eric