This document was generated from CDN thread
Created by: David Robinson on 10-06-2009 10:06:29 PM
Is there a way to asynchronously fetch data within a Studio app?
Looks to me like none of the elements support the ability to fire off a data fetch (say DB or Web Service) as a background task and continue processing/interacting with a customer in the foreground.
Simple example:
Want to determine if the caller ANI matches one on a DB. Sometimes this fetch may take some time so would like to be able to do it early on while lengthy prompts are playing to the customer.
Subject: RE: Asynchronous data fetch
Replied by: Janine Graves on 10-06-2009 11:12:54 PM
Hi Dave,
The Call Start java class can execute in the background (in the Project-Properties-EndPointSettings the Call Start has a checkbox for Run in Background) so that you can start a database fetch and then set a flag or create a variable when it's done. In the meantime,the application starts and speaks a greeting to the caller, and then checks if the data has been created yet, if not, delay and check again. Also, any other java component can start a new thread that does the db interaction so that the application continues on.