I'm working on a project where i need to make a lot of webservice calls for an overview site. What i want to do is have next to nothing in the preperation but make the calls asynchronously so the info they return is displayed when they are done.
Do you have any good ideas on how to achieve this ?
Please elaborate your use case.
For asynchronous process there are timers in Outsystems which runs asynchronously and you can invoke them programmatically as and when needed , the second option is to write an extension with some async methods and call your webservices within those async method(s) .
To elaborate on my usecase. This is a lookup site for a customer. You are presented with a serach page where you can type in the ID that you are looking for. Once you have found the customer you are navigated to a different page where you can see pretty much everything about him. Here i have to make several calls to all these different systems. I have to fetch data about his home, i have to fatch data about what services he has ordered, what the status of his equipment is, all previous orders to his home and more.
I have the site set up with tabs to organize the date. But as you can see, I have to make an upwards of maybe 10 calls to different systems to get all the data and I dont want to do that all in the preperation. The site needs to load fast and be interactive (dont want to lock the UI) so the user can see the data as it comes in.
the problem with using timers is that you cant get to the output parameters of the function.
I have to look into the extension way. Thank you :)
I understand your problem and you have the solution to ...seperate your data in tabs and use server side tabs now instead of loading your data in preparation, load it on tab active event so that you can only get the data for the tab .Keep webblock for every tab and write the logic to load data in webblock prepration for only that section and when you refresh your webblock in tab active event your data will be loaded.
If you want i can share an oml with the same scenario.
Pramod Jain wrote:
that would be lovely :)
Sorry for the delay response ..here is the example oml for loading tab server side . I put the comments to make it easily understand to you but still if you have any doubt please let me know.
There is a default tab which will be loaded with the page as default and contents in other tabs will only load when you activate the tab.