Hi All,
One Scenario:-
We have 2 REST services which is giving data to our pega application HTTP Method = GET.
a) How we can use these 2 different REST services inside Activity?
b) We want to merge the response given by these 2 REST service and want that data to display in Grid Table layout.
Can some one please share effective way of doing this.
Thanks In Advance.
@AbhishekC1725 you can use Load-datapage and connect-wait in activity and in dpage, configure it as aggregated sources. In the below link you can see it is sourced with 2 RDs as it is different tables scenario. As yours is 2 different connect rest, you can give 2 connect rest as the sources.
https://onestoppega.com/data-modeling/aggregate-source-in-data-page/
@Anoop Krishna Thanks Anoop for response
.
Just one thing want to confirm Suppose if response get delayed out of these 2 REST service due to any reason. So how we will handle this thing?
@AbhishekC1725 if response is delayed because of some reason we can know that with the api response and we can set a flag, for eg:- api2results=false(meaning api 2 didn’t give results). In the flow where we call this utility activity, we can use a decision shape checking both the flags. If any of the flag is false we can queue this utility activity to a dedicated queue processor with delayed 30 mins or 1 hours so that api will be hit again.
Also in the data page, here it should be 2 activities instead of 2 connect rests and in the activity we can use the flag as first check to hit api. If flag false hit api else exit activity.
@Anoop Krishna Thanks for Response 