How to invoke Async service under thing in ThingWorx extension code.
Hi,
I would like to understand how to make the Async call to ThingWorx Service under the Thing and get the results.
We are using the ThingWorx extension which contains the Thing which has the service.
Currently the service is sync service, we use the Thing API processServiceRequest to invoke the service using extension code and get the results which is working fine.
Sample code :
Thing thing = (Thing) ThingUtilities.findThing("ThingName");
InfoTable result = thing.processServiceRequest("serviceName", params);
As this service is called multiple time from extension code in loop and the service is sync service we need to wait till service execution to complete before making another call.
To improve the performance we are willing the make the Thing service Async which can be achieved by making the service Async feature.
Now as we have make the service async whenever we invoke the service using API "processServiceRequest" it is invoked Asynchronously and the control goes further. Hence, we do not get the any results.
Can anyone let us know how we can handle this scenario how to catch the response from Async thing service?
Thanks,
Suraj.

