Load data Pages asynchronously using connect wait method
I am trying to load the data pages asynchronously using Load-DataPage and Connect-Wait method. It is working as the data page seems to run in seperate requestor or thread. But my question here is If my data page is running in different thread how can i access the value of the data page in the current thread.
Below are the steps I did.
1. Created a data Page of type thread
2. Created an sample activity of type activity(WrapperActivity) in this activity
3. Create another TESTLOADPAGE activity of type "Asynchronous" with below steps
1. Load-DataPage - gave the data page name and pool id
2. Connect-Wait - gave the pool id and time limit of 30 sec (Since my data page operation will take 15-20 sec)
4. Now in my WrapperActivity I called the TESTLOADPAGE activity using call-Asyn-Actvity or general Call method. I can see my datapage is performing it task. But i could not access any property from the data page. I want to get the value from the data page. Please let me know if there is any way.
The Load-DataPage method will load the data page asynchronously so you shouldn't need a wrapper activity that calls the TESTLOADPAGE activity asynchronously. The Connect-Wait method will then join the requestor thread with the background thread that loads the data page. After these steps you should be able to refer to your data page.
I ran a quick test on my system. I enabled the ADP Load and Data Types event types in Tracer while running my test activity. If I execute a Property-Set before the Connect-Wait step, then the data page is load synchronously at that point.
If I referred data page in Property-Set after connect-wait, it is loading the data page once again which should not happen.Without that property-set how I'm able to refer pyworkpage values inside the data page?
Can you share more details on the steps in your activity and the data page? Is it a parameterized data page? If the data page uses parameters then those will need to be passed with the appropriate value or a new data page would be loaded.