
Announcements
I'm making a rest api call which takes some time to get data back. While the data is processing, initially you get a 404 and then it changes to 200 but not all of the data is returned until about 30 seconds later.
While getting the 200's but still waiting for the data, the "Result" array is empty. Once the data is finally available, the Result array populates.
I'm trying to set up a do until to loop until the Result array is populated but having trouble figuring out the condition to check for. I initially was checking for a 200 status but after the initial 404's, it'll return 200's for awhile while the Result array is still empty so that didn't work. I'm ultimately trying to check to see if there's at least one array member in Result before going to my Response step. Tips?
Thanks in advance!
Hello @russrimm1 ,
I'm not sure if there's a better way to wait for the response, but looking on the flow, if the 'HTTP 4' action is the REST API call then you would repeat the call with every loop (every 2 seconds).
Also, shouldn't the condition to check the array be the other way around, 'If empty(..) is equal to true' (the array is empty), wait another few second? As it is now, if the array is empty (the expression result = true) it'll end the 'Do until', if it's not empty (expression result = false) it'll wait 2 more seconds.