How to order the execution of aggregates?

How to order the execution of aggregates?

  

Hello Guys,

I have been trying to set the order that my aggregates will be executed in mobile development, how can I do it? I don't know if it's possible but anyone has any idea?

I think that execute one refresh data after fetch data is not good, because if the screen has many aggragates the performance goes down.

In the course for mobile development on the website, there's also an offlinesync action that combines the fetching of multiple aggregates. Don't know if that is equal to your case.

Hi Geuvan

It is possible to do what you want if you add those aggregates into a Screen Data Action:

Even so, it is not recommended to perform too many aggregates because your screen will not be rendered until this flow ends (if I'm not mistaken).


But my real question is: "Why do you need your aggregates to be executed in sequence?"


[edit] you may find useful this other post with related information.

Kurt Vandevelde wrote:

In the course for mobile development on the website, there's also an offlinesync action that combines the fetching of multiple aggregates. Don't know if that is equal to your case.

that is not my case.   



Nuno Maurício wrote:

Hi Geuvan

It is possible to do what you want if you add those aggregates into a Screen Data Action:

Even so, it is not recommended to perform too many aggregates because your screen will not be rendered until this flow ends (if I'm not mistaken).


But my real question is: "Why do you need your aggregates to be executed in sequence?"


[edit] you may find useful this other post with related information.

I have been worked on sale screen and i need to combine some variables(business rules) to form the right price, like form of payment, Product packagin and  others and each customer has a main combination and some aggregations depends of another one. maybe the better is change my aggregates to after fetch event.

Solution

In that scenario, I'm assuming that you need to refresh the "main" Aggregate when something changes. For those cases, the AfterFetch option seems to work better than the DataAction one.


Solution

Nuno Maurício wrote:

In that scenario, I'm assuming that you need to refresh the "main" Aggregate when something changes. For those cases, the AfterFetch option seems to work better than the DataAction one.


Yes. i'll do it. thanks