Skip to main content
June 22, 2023
Question

calling a Async service call need to update the response in interface ,how to refresh data on screen when I receive response from service through Appian Web API

  • June 22, 2023
  • 7 replies
  • 0 views

on page 1 on click of submit button am calling a Async service call which will return the data through calling Appian Web API and API is storing data to Maria DB. Meanwhile API is running user is forwarded to Page 2 on page 2 am dependent on the service call response which i called on page 1,as it was written to Maria DB how to get data from Maria DB to page 2 automatically without user action and can't use refreshVariable interval because not definite time on receiving response from service

did any one implemented Async service calls in their work? if yes please let me know how you implemented the process of receiving response and reflecting the same on interface

Thanks in advance

7 replies

stefanhelzle0001
June 22, 2023

That is not a great pattern for a good UX. But you probably know that already.

Well, a refresh would be the automatic option. Not sure why you do not want to use that. I would add a refresh button to keep the user's attention.

June 24, 2023

in my requirement I will receive response through Appian API and API will write to DB and on interface  i have to query DB until i have response , I thought using refreshVariable with time interval wouldn't be good option because IN PROD we have this application around 800+ locations andif is use time interval refresh it will impact server , but recently i found out that we can conditionally give refreshVariable Interval by using fv!value

So currently am doing it and it is working fine

Thanks for your response.

stefanhelzle0001
June 24, 2023

How long does this API call take? If this is more than 30 seconds, make sure to make the refresh interval a long as possible to avoid any unnecessary refresh. And make sure the user knows that he has to wait a bit.