Hi,
Hello I'm trying to execute the following STAX job file and I'm getting the
following error:
The process failed to start, RC: 10, STAFResult: Error starting the process.
CreateProcess failed with OS RC 2: The system cannot find the file
specified. Invalid command: FreqAndLevelTest()
<stax>
<defaultcall function="StartHere"></defaultcall>
<script>
import sys
sys.path.append("C:/Reg Test/jniwrap/jniwrap-2.9.5.jar")
sys.path.append("C:/Reg Test/jython/hwMods/SigGen")
sys.path.append("C:/Reg Test/jython/hwMods")
sys.path.append("C:/Reg Test/jython/hwMods/carrierFreqAndLevelTest.py")
from carrierFreqAndLevelTest import *
test = [ ['FirstTest', 'FreqAndLevelTest()'] ]
</script>
<function name="StartHere">
<sequence>
<process>
<location>'local'</location>
<command>test[0][1]</command>
<stdout>'C:/temp.out'</stdout>
<stderr mode="'stdout'"></stderr>
<returnstdout></returnstdout>
</process>
<if expr="RC != 0">
<log level="'error'">
'Process failed with RC=%s, Result=%s' % (RC, STAFResult)
</log>
<elseif expr="STAXResult != None">
<iterate var="fileInfo" in="STAXResult" indexvar="i">
<if expr="fileInfo[0] == 0">
<sequence>
<log level="'info'">fileInfo[0]</log>
</sequence>
<else>
<log level="'error'">
'Retrieval of file %s contents failed with RC=%s' % (i,
fileInfo[0])
</log>
</else>
</if>
</iterate>
</elseif>
<else>
<log level="'info'">'STAXResult is None'</log>
</else>
</if>
</sequence>
</function>
</stax>
carrierFreqAndLevelTest
CarrierFreqAndLevelTest is the jython file where in this file the function
FreqAndLevelTest() resides. Well the STAF is actually able to locate to the
Jython file but is not able to see the actual function in this file.
My question is :
1. Is the <process> element not capable of executing a function and is
capable of calling the only the file (as processes)?
2. How is the best way to execute some functions from a jython code as a
process or a sub-job?
Thanks and regards,
Rajat
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users