Post new topic Reply to topic  [ 2 posts ] 

Board index : TeleFlow Forums : TeleFlow Designer & Simulator

Author Message
 Post subject: How to send a string back to teleflow from an exe
PostPosted: Tue Mar 02, 2010 11:01 am 
Offline

Joined: Tue Mar 02, 2010 9:53 am
Posts: 1
hi all

at some point in my teleflow app i run an exe that is written in vb6 and compiled to an exe

i use the "RUN PROGRAM" component and give it the following line
"D:\PinsOnPaper\VoiceMailApps\VoiceMail\Vb.exe 0001,1258"

this works fine, the exe runs the command window is visable and teleflow halts waiting for the exe to terminate

in vb6 i use the following code

GetCommand = Command

i now have the var's passed by teleflow to the exe in a string called "GetCommand"

now i do some work with the var's ie "0001" and "1258"

now i don't know how to pass a string back to teleflow
i tried Command = "string to pass back to teleflow" but it dose not work

can you help me out

thank you


Back to top
 Profile  
 
 Post subject: Re: How to send a string back to teleflow from an exe
PostPosted: Mon Mar 08, 2010 11:21 am 
Offline

Joined: Wed Mar 19, 2003 4:28 pm
Posts: 510
Location: Canada
An .exe run on the command line (which is effectively what you are doing) can take any arguments you wish (as you have already seen). It can return a value, but this would be for a numeric error code. (If you do a web search for "VB exe return result" you will get plenty of examples of this)

To get a string or strings, here are some possible alternatives:

1) Have your EXE create a text file or xml document with the appropriate response value(s), then exit/close. TeleFlow can use a Load File or Load XML step on the file, and then you can use other steps to process the response. To ensure each application instance is using its own unique file, just have a directory all such files are written to, and name them something like "response_[port number].txt". The port number is something you can pass to your exe as another argument using the TeleFlow system variable: @PORT.

If you want to keep a log of all response files, you could name them something like response_[date/time string]_[port_number].txt. You would then need to use a Scan Folder step to scan for files named response_*_[port number].txt, and be sure to move the file after processing it to a "processed" directory of some kind.

2) Instead of running an exe each time you need to get a response, have one that runs all the time and accepts TCP connections, and you can send it packets of information, and receive packets back on that connection. A web service you can use the http step to get information from is another way to request specific information and receive it back into your application.


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

Board index : TeleFlow Forums : TeleFlow Designer & Simulator


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.