First, is there a reason you are using <stafcmd> instead of <process>? The 
recommedation is to use <process> for PROCESS START requests.

What is the exact error you get?  Does the STAX job start, or do you get 
an error when submitting the job?  If the job starts and the process is 
not starting, then add the following to your STAX job (add the 
RETURNSTDOUT STDERRTOSTDOUT options to the PROCESS START request, and 
write the RC/Result to the STAX Monitor and the STAX Job User log via a 
<message log="1"> element):

      <stafcmd name="'Execute suite automation test'">
        <location>"flamewinxp32"</location>
        <service>"process"</service>
        <request>'start shell command ' + '"' + 'cd
C:\\flame\\main\\qe\\automation\\bin &amp; runworkflow.bat --input
..\\testfiles\\fxg\\native ..\\workflow\\dclark_FXG_FLA_FXG.xml &amp;
C:\\python25\\python.exe runworkflow.py --inputdir
..\\testfiles\\fxg\\native --config
..\\workflow\\dclark_FXG_FLA_FXG.xml' + '" RETURNSTDOUT STDERRTOSTDOUT 
wait'</request>
      </stafcmd>
      <message log="1">'RC=%s, Result=%s' % (RC, STAFResult)</message>
 
You could also try using a <process> element (and maybe try removing the 
extra quoting you have in the <request> above):

    <sequence>
      <process name="'Execute suite automation test'">
        <location>"flamewinxp32"</location>
        <command mode="'shell'">'cd C:\\flame\\main\\qe\\automation\\bin 
&amp; runworkflow.bat --input ..\\testfiles\\fxg\\native 
..\\workflow\\dclark_FXG_FLA_FXG.xml &amp; C:\\python25\\python.exe 
runworkflow.py --inputdir ..\\testfiles\\fxg\\native --config 
..\\workflow\\dclark_FXG_FLA_FXG.xml'</command>
        <stderr mode="'stdout'"/>
        <returnstdout/>
      </process>
      <message>'RC=%s, STAXResult=%s' % (RC, STAXResult)</message>
    </sequence>       
 
Thanks, 
David 

David Bender 
STAF/STAX Development 
IBM Software Group, WPLC 
 
11501 Burnet Rd. 
Bldg. 903-5B002 
Austin, TX 78758-3400 
 
Phone (T/L): 1-512-286-5315 (363-5315) 
ITN: 23635315 
Email: bda...@us.ibm.com 
 





Shiying Huang <shiying.hu...@gmail.com> 
08/18/2009 12:34 AM

To
staf-users@lists.sourceforge.net
cc

Subject
[staf-users] command run sucessfully in cmd(windows) but failed with STAX 
XML






hi, all

I am trying to invoke a batch file on a Virtual machine which is name
flamewinxp32 using this command line

C:\>staf flamewinxp32 process start shell command
 "cd C:\flame\main\qe\automation\bin & runworkflow.bat --input 
..\testfiles\fxg\
native ..\workflow\dclark_FXG_FLA_FXG.xml & C:\python25\python.exe 
runworkflow.p
y --inputdir ..\testfiles\fxg\native --config 
..\workflow\dclark_FXG_FLA_FXG.xml
" wait

but failed with the following stax xml file:

<stax>
                 <defaultcall function="main"/>

 <function name="main">
    <sequence>
        <stafcmd name="'Execute suite automation test'">
        <location>"flamewinxp32"</location>
        <service>"process"</service>
        <request>'start shell command ' + '"' + 'cd
C:\\flame\\main\\qe\\automation\\bin &amp; runworkflow.bat --input
..\\testfiles\\fxg\\native ..\\workflow\\dclark_FXG_FLA_FXG.xml &amp;
C:\\python25\\python.exe runworkflow.py --inputdir
..\\testfiles\\fxg\\native --config
..\\workflow\\dclark_FXG_FLA_FXG.xml' + '" wait'</request>
      </stafcmd>
    </sequence>
  </function>

</stax>

I cannot get a clue why the XML file doesn't work. Can anyone give me a 
hint?

Thanks in advance.

--Irene

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 
30-Day 
trial. Simplify your report design, integration and deployment - and focus 
on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to