Post new topic Reply to topic  [ 6 posts ] 

Board index : TeleFlow Forums : General

Author Message
 Post subject: Problem calling external program
PostPosted: Thu Oct 06, 2011 2:06 am 
Offline

Joined: Thu Oct 06, 2011 1:31 am
Posts: 4
I used an evaluation copy of CT developer to make a sample application which ran very good using the simulator.
The application takes input from the caller and pass it to an external exe program originally build using VB6 and waits for a response.

Every thing is fine with the simulator, but when i tested it using a real phone the program window does not show up and the external call never returns to teleflow even though I can see the program in the task manager.

Would you please give me a hent of what might be the cause of this problem.

thanks


Back to top
 Profile  
 
 Post subject: Re: Problem calling external program
PostPosted: Fri Oct 21, 2011 9:33 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
What does this VB program do?

Does it normally (I.e. if you run it yourself or through simulator) pop a window up at all? Is it awaiting input? Is it supposed to simply run, do something, then terminate? If so, TeleFlow won't get past the step that is running the program if it never terminates properly.


Back to top
 Profile WWW 
 
 Post subject: Re: Problem calling external program
PostPosted: Fri Oct 21, 2011 4:44 pm 
Offline

Joined: Thu Oct 06, 2011 1:31 am
Posts: 4
I changed the logic and used "tcp connect" instead of "Run program" to exchange data with my VB application and everything is perfect in both simulator and real phone.

Just for history, the vb program takes input from the caller and does som data base queries then returns 1 or 0 to teleflow.

With the simulator the "Run program" component calls vb program and waits for the return code 1 or 0. the program window pop up for 2 seconds then terminates and Teleflow plays the right voice file.

With the real telephone the "Run program" component calls vb program but the program window does not pop up and teleflow waits forever, until I used task manager to kill the vb process then Teleflow resumes assuming the return is 1

the code of the vb program is very simple:

Private Sub Form_Load()
If Command <> "" Then
'MsgBox "User number: " & Command
result = SearchDataBase(command)
if result = true then
ExitProcess (1)
Else
ExitProcess (0)
End If
Unload Me
End Sub


Back to top
 Profile  
 
 Post subject: Re: Problem calling external program
PostPosted: Fri Oct 21, 2011 4:52 pm 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
As TeleFlow is running as a service, there's no telling what was happening there. Not too surprising that having a service that runs in the background run a foreground application to get information didn't work properly, although I couldn't tell you off-hand what was going wrong.

If you were to try debugging it, I probably would have suggested trying running TFServer.exe in console mode to see if that made any difference. Adding some logging to disk from the VB app, to indicate what stage it has gotten to in processing might also have been necessary. (there might simply have been some rights/permissions issues running as a service that you wouldn't encounter running the simulator with a logged-in user)

In this case, it sounds like there's little point in trying to investigate anyway. What you've come up with is probably a better solution for the problem.

Thanks for posting the details in spite of already having a working solution!


Back to top
 Profile WWW 
 
 Post subject: Re: Problem calling external program
PostPosted: Mon Oct 24, 2011 3:29 am 
Offline

Joined: Thu Oct 06, 2011 1:31 am
Posts: 4
In the service property select tab "Log On" then check the box "Allow service to interact with desktop". This will fix the problem. thanks chris for giving me the authority hint.


Back to top
 Profile  
 
 Post subject: Re: Problem calling external program
PostPosted: Mon Oct 24, 2011 9:59 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
Glad I could help. Thanks for posting the solution!


Back to top
 Profile WWW 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

Board index : TeleFlow Forums : General


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Style by Midnight Phoenix & N.Design Studio
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.