VoiceGuide IVR Software Main Page
Jump to content

Run Program Module

Recommended Posts

Hi,

 

I wrote an external wrapper program in C++ which make use of the system() call to execute a Java Program in order for it to block until the Java Program finish execution.

 

I did this because running the Java command line from the Run Program module will never execute the program. It quits even before the Java program starts.

 

With the C++ programs, it basically does the same thing, the DOS windows flashes and it assumes that the program finish executing.

 

If I manually typed in the cammand line to run in the "RUN" option in Windows or in a DOS Prompt, the program executed perfectly.

 

I am wondering how can I get my program to finish executing with the "RUN PROGRAM" module before it moves to the next module.

 

I even wrote a simple C++ exe program that will write a line in a text file and the DOS windows just flashes and quits and nothing has been done.

 

Please help. Thanks.

Share this post


Link to post

The Run Program module can be selected to wait until the program it started completes running.

 

This feature is extensively used by many customers and we have not received any bug reports about it.

 

I'm not too sure what the C++ program is doing - but is that program waiting for the JAVA application it starts to complete before it itself exits? I suspect it does not and that is why you are seeing the Run Module moving on as well...

Share this post


Link to post

Hi,

 

I have set it to wait until programs terminates.

 

Alrite, this is what the C++ program does.

 

If I run the C++ EXE file in the command prompt. I can see it blocks until the java program terminates. I runned the java program using the system() call.

 

The system() call in C will block until the process completes, so it works perfectly if I run it on a command line passing in arguments.

 

However, if voiceguide runs it with arguments too, the DOS console windows flashes and there it goes, the program never had a chance to complete. Not even a fputs() was written. This fputs() line was executed before the system() call is executed.

 

So, what does this "Run Program" module actually does? How it runs the external program?

Share this post


Link to post

Solved this problem. It was due to the C++ System() call.

 

It was an old unreliable function. Fixed it with some other approach in executing external programs within a program.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×