How can we call a data page synchronously and asynchronously?-see asynchronously we can use Load -Data Page method but simultaneously calling it synchronously and asynchronously?is this possible?
Please refer the below mentioned article, we have explained about asynchronous process completely.
Asynchronous Data Page - its Configuration, Usage & Execution - OneStopPega
A data page is synchronous by default, and if you want asynchronous loading, you explicitly queue it with Load-DataPage and later synchronize with Connect-Wait. So for the same invocation, it is either being referenced synchronously or queued asynchronously first and then waited on. it is not truly both at the same time
If you want async behavior, use Load-DataPage and then Connect-Wait. So the same call is not both sync and async at once. The practical pattern is: load asynchronously, do other processing, wait, then use the data page normally.
Also be careful not to reference it before Connect-Wait, otherwise Pega may invoke it synchronously again.
Though it’s technically possible to call, but not recommended apporach
Step1: Load-Data-Page - Trigger the data page asynchronously
Step2: Property-Set - Trigger the data page synchronously
Step3: Connect-Wait
Please note: Connect-Wait has no significance because the Step 2 resumes the main thread which was waiting for async call.