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.
|