75
Views
8
Comments
Is there a way to give a DataFetch/Aggregate priority status to be fetched first

Sometimes when you have multiple DateActions/Aggregates all set to 'Fetch' 'At Start', the ones you really care about finishing first are only triggered/qued last which is very frustrating. But you don't want to set some to OnDemand to fix this since that will slow those down.

Is there any way to get specific ones to be qued first such as the one highlighted in blue which I ideally want to be qued first rather than last where it currently lies... is there a way OutSystems chooses which to be qued first and last?

This time is what I am ideally trying to avoid with this specific fetch:

2023-05-30 10-05-13
Lourenço Matalonga

Hi Nicholas,

the only way i know to try and fix this is setting the others as fetch only on demand and add them to the after fetch of the one you fetch at start. But the overall time of fetching data will be slower. So not really sure if there is another way to tackle this.

Best regards,

Lourenco Matalonga

2022-11-02 07-18-33
Nicholas Campbell

Thanks Lourenço

Yes this won't achieve the overall desired result, unfortunately.

You don't happen to know how OutSystems decides what to fetch first between fetches that are all set to 'At Start' do you?

2023-05-30 10-05-13
Lourenço Matalonga

Unfortunately I do not know. I always understood that they would all start at same time asynchronously but the finishing order, that is something that you do not know and may depend on multiple known and unknown factors. 

2022-11-02 07-18-33
Nicholas Campbell

Yes so you can see from the first image that all 7 were called at the same time, but the browser only allowed 6 asynchronous calls to take place simultaneously, so the 7th (in this case the most important for me) waits for one of the first 6 to finish before it actually is able to fetch the data...

2023-05-30 10-05-13
Lourenço Matalonga

I did not know about that limit of six aggregates. Good to know. Hmm can't you merge two into one data action? This way you only would have 6 server requests. You might have already tried it.


2022-11-02 07-18-33
Nicholas Campbell

Hi Lourenço

Yes always an option. I've looked into it as an option, since it's a case bt case solution, and unfortunately it won't make sense this time. But thanks for suggesting.

I think there is not a way to do this in OutSystems else someone would have suggested it already. I'll log it as an idea to see if others also have wanted this feature.

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Not sure if it would work, but you could try to set all of them to on demand, and refresch them with a promise in OnInitialize in the desired sequence

Dorine

2020-07-02 13-32-59
Max de Groot

Would it be an idea to only set the one you care about the least to 'OnDemand' and let that one be fetched as soon as the quickest data action completes (so on that data actions OnAfterFetch)? 

That way you still have 6 data actions starting at the same time, the quickest one to finish then calls the least important one, which would then still be fetched relatively quickly. 

Not sure if this works or if it won't start a new asynchronous thread, but this came up when reading your questions and suggestions etc. 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.