Question
Cognizant
IN
Last activity: 7 Jun 2024 8:22 EDT
How to fetch details from an external system when the external system can take some time to respond back
I have a requirement where we need to fetch the data from an external system, but sometimes this external system can take up some time to respond back for our request. How to implement this?
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
NCS Pte. Ltd
SG
Hi @TanyaS58: When you say the external system is taking time to respond, can help to understand if this is a async request made to external system (or) live call to get data from external system and what is the delay you are expecting. Also please help us to understand the use case and the usage of data in application.
Based on the application need, please also check if you can cache the data in PEGA using data page (or) a local storage. In this case you can make the data available in your cache (or) local storage using a background process (refreshed periodically based on application need) and your application logics can refer to the local data.
Thanks.
Cognizant
IN
Hi @ArulDevan & @Anoop Krishna actually my requirement is like while calling the service,the service itself takes sometime to respond back.It does not provide the information as soon as it is called.This I am doing for a POC.
Cognizant
IN
@Anoop Krishna so bascially in dedicated queue processor activity itself we need to call the connector?
Bits in Glass
IN
@TanyaS58 yes right, you will be calling an activity within dedicated queue processor. Within that activity you need to call the connector.
Bits in Glass
IN
@TanyaS58 if kafka is available, then that would be best approach. Service team just need to publish the data to the topic and you just need to consume the topic and with that data you can proceed the case.
If kafka is not available, you can have a dedicated queue processor to hit the api and check for the status and data. Till the data is not available you need to retry the api hit, this will be like a loop using decision shape(negative path of decision shape) . Once data is available and status code is 200, you can proceed the flow which will be the positive path through the decision shape.
Incessant Technologies
GB
@TanyaS58 Based on your use case, it needs to be asynchronous call to external system.
Pega Provides various asynchronous communication types like
- Listeners
- Files
- REST
You can use any of these based on your enterprise Architecture.
Lantiqx Systems India Private Limited
IN
It is important to identify the root cause of the issue. Check Pega Logs and Review External System Performance
Regards,
Mamatha Adiraju
TCS
IN
@TanyaS58 Please check below topic to understand, commonly-used approaches for asynchronous integration