VoiceGuide IVR Software Main Page
Jump to content

How Run Program Module Returns Value

Recommended Posts

Here i have made a small .exe file using Microsoft dotnet, this .exe application accepts two values and then he writes the sum of two values in a txt file locted in e:\tc.txt.

In .vgs script i am accepting those two values through phone and then using RUN program Module running that exe file again i am using one more RUN program module to get the value written in txt file. but getting error so need help.

i have tried with both the possibilites "wait until the program completes" and "do not wait until the program complete".

 

>>in Wait until the program completes i am getting the error

and here is the trace file

181051.064 4 7 4 timer EV_TIMEOUT_CHECKONSTATE

181051.064 4 7 4 qScr add evScriptEvent 9007 EV_TIMEOUT_CHECKONSTATE

181051.064 6 7 4 qScr run evScriptEvent sCode=[EV_TIMEOUT_CHECKONSTATE] iActionID=0, crn=0[0|0|0|0|0][|||||]

181051.064 6 7 4 scriptevent EV_TIMEOUT_CHECKONSTATE 0|0|0 ||

181051.069 6 7 4 LsRunWaitTillFinished EV_TIMEOUT_CHECKONSTATE lCode2Str=EV_TIMEOUT_CHECKONSTATE

181051.070 6 7 4 Process.HasExited is false (awaiting process end or COM function call) handle=12252, id=3280, StartTime=5/29/2011 6:10:50 PM

181051.070 6 7 4 .ExitTime returned error.

181051.070 6 7 4 LsRunWaitTillFinished: process still running

181051.070 6 7 4 t timer set 1 sec : EV_TIMEOUT_CHECKONSTATE

 

>>Do not wait until the program completes.. in that case i am not getting any error but unable to write data into the text file, that .exe application is working fine from command prompt.

------

there is one more way is there to return data back on running RUN PROGRAM Module using "Run_ResultReturn"....

if u give a small example how to use it will be better in this case.. i gone throw the help document but unable to get the correct information how to use this return variable.

RunExe.vgs

0529_1810_vgEngine.txt

Share this post


Link to post

You can call the Run_ResultReturn function through WCF. Just add the vgServicesInterfaces.dll to your .NET project.

 

If you want to return a result from your .EXE then you need to run the .EXE in the "wait until the program completes" mode, so that VG waits for some sort of result being returned from .EXE. (result can be a function call like Run_ResultReturn etc., or can be a Result File created).

 

If you the "do not wait until the program complete" option is selected then VG will start the program and immediately continue onto next module. VG will start running the next module immediately, before the .EXE just called had a chance to fully be loaded by OS and start.

 

If you are calling another .EXE that relies on first .EXE to complete first then you will need to have VG script wait until the first .EXE completes, before calling the second .EXE

Share this post


Link to post
nable to write data into the text file

Trace shows that your command line has this:

 

$[Get Numbers First] $[Get Numbers Second]

 

It should be:

 

$RV[Get Numbers First] $RV[Get Numbers Second]

Share this post


Link to post

I have solved this problem, i have got a good command over this module (RUN PROGRAM) that it can execute .exe application and that .exe application can response back to VG by writing the data into the text file stored in the same location from where the .exe was executed.

---Now i will also try with other proceedure which is available in VG to return value using Run_ResultReturn.

--thanks for support team for there support.

-take care bye.

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
×