109
Views
6
Comments
How to Aggregate data in the service module and call that in Reactive web module?

Hi, 
    I have 2 modules (i) Reactive web module where it has UI screens (ii) Service module where I have kept entity, service actions.

 I have kept my aggregate in my User Details Screen in the Reactive Web Module like this Instead of directly exposing my aggregate in the screen, I need to call it from another module i.e service module where entity, service actions are available.

I don't need to directly call the aggerate in the screen. In order to call my aggerated data, I have kept in a server action but when calling from service module to the reactive module to that particular screen for example in the Home screen, I am unable to fetch data from that server action.

How to do aggregation / fetch the data from database for a particular screen instead of directly call from the db ?since I no need to show my data sources, filter, sort in my Reactive web Module. I need to keep all this aggregation. Is there any other possible to keep my aggregated data in the service module?

 

2022-04-29 09-08-10
Pramod Torase

Hi,

If you dont want to fetch data using aggregate at screen level then you can use DataAction and call the server action which fetches data inside that.

right click on screen and select "Fetch data from other sources". this will create a dataaction on that screen and inside you can call a action which will fetch data.

Regards,

Pramod.

UserImage.jpg
Annie Bibiana Yesudass

Hi @Pramod Torase
                   I tried the same way, created a server action named it as GETUsersWithGroupUsers like this where I have joined multiple entities. 

I have created a Data Action in which I have the above server action. I tried to set values but facing error. Is this correct? Is there any other possible way ?

2020-11-05 04-47-48
Nghia Hoang

Hi Annie, based on screenshot, your Out1 parameter having DataType is Text. You should follow steps:
1. Define a structure with attributes that you want to capture from the Server Action. 
2. Update the Data Type of Out1 become List of Structure that you had defined in step 1.
3. Then you can Assign Out1 with returned value from Server Action and doing mapping for attributes.

2024-05-08 06-29-37
Prince Aadil Khan Panwar

Hi Annie,

you should go through this. you will be able to create actions on screen. by following this link. click here

Thanks
Prince

2025-09-25 14-38-22
Lokesh Kumar Yadav

Hi Anniee ,

This attachment file will you I implement in the server action the same thing you have to  implement in the service action

Fetch Data server action.oml
2020-11-10 07-09-26
Dadi

Hi

If i am not wrong, you already have the aggregate inside server action on user details screen, then you want to pull that server action on home screen for avoid create the aggregate again?

So, when you want to use the server action or what the purpose we want to get the data?

If you want to put data on screen, @Pramod Torase already give the solution. You can continue define the output data structure same as your aggregate. As far I know you need to create list records that contain User, Group, ......, User_Role structure. So then can assign the output equal to aggregate.


Regard

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