Cindy, Ignore my previous note. Actually, you are getting a STAXPythonEvaluationError on argument value:
PRODUCT='Harmony'
because that is not proper syntax for assigning an argument. That is
actually Python code that can only be executed, not evaluated by Python.
Note that it also fails if you specify that via the ARGS option on a STAX
EXECUTE request via the command line. For example:
C:\>STAF local STAX EXECUTE FILE "c:/temp/passArgs.xml" ARGS
PRODUCT='Harmony' WAIT RETURNRESULT
Response
--------
{
Job ID : 12
Start Date-Time: 20120216-13:41:31
End Date-Time : 20120216-13:41:32
Status : Terminated
Result : None
Job Log Errors : [
{
Date-Time: 20120216-13:41:32
Level : Error
Message : STAXPythonEvaluationError signal raised. Terminating job.
===== XML Information =====
File: c:\temp\passArgs.xml, Machine: local://local
Line <Error in ARGS option>: Error in element type "<External>".
===== Python Error Information =====
com.ibm.staf.service.stax.STAXPythonEvaluationException:
Python object evaluation failed for:
PRODUCT='Harmony'
SyntaxError: ("mismatched input '=' expecting EOF", ('<pyEval string>', 1,
7, "PRODUCT='Harmony'\n"))
===== Call Stack for STAX Thread 1 =====
[]
}
]
Testcase Totals: {
Tests : 0
Passes: 0
Fails : 0
}
}
Perhaps you meant to specify to specify an argument map with a key named
'PRODUCT' to the default function, then you would specify:
{ 'PRODUCT': 'Harmony' } or
{
'PRODUCT': 'Harmony'
}
Or, if you really wanted to execute Python code:
PRODUCT='Harmony'
then instead of assigning that to a function argument, then you can
specify that via the "Scripts" tab in the STAX Monitor (equivalent to
using the SCRIPT option at the command line for a STAX EXECUTE request) as
the SCRIPT option allows you to define Python code to be executed. For
example:
C:\>STAF local STAX EXECUTE FILE "c:/temp/passArgs.xml" SCRIPT
PRODUCT='Harmony' WAIT RETURNRESULT
Response
--------
{
Job ID : 15
Start Date-Time: 20120216-13:47:01
End Date-Time : 20120216-13:47:02
Status : Normal
Result : None
Job Log Errors : []
Testcase Totals: {
Tests : 0
Passes: 0
Fails : 0
}
}
Using the SCRIPT option is like a <script> element in the root <stax>
element in the XML document, but defined when submitting an execute
request, rather than within the XML document.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, [email protected]
(512) 286-7313 or Tieline 363-7313
----- Forwarded by Sharon Lucas/Austin/IBM on 02/16/2012 01:25 PM -----
From: Sharon Lucas/Austin/IBM@IBMUS
To: Cindy Zhu <[email protected]>,
Cc: "[email protected]"
<[email protected]>
Date: 02/16/2012 01:07 PM
Subject: Re: [staf-users] Passing arguments from STAX Job Monitor
Hi Cindy,
You are getting a STAXPythonEvaluationError on the argument value because
in the STAX Monitor's "Function" tab, you are specifying PRODUCT='Harmony'
and you are pressing Enter which adds a '\n' character (a new line
character), so you are actually specifying PRODUCT='Harmony'\n (which is
not what you specified when passing the argument via the command line).
Note the Python error message displayed indicates this:
SyntaxError: ("mismatched input '=' expecting EOF", (", 1. 7,
"PRODUCT='Harmony'\n"))
If you specify 'PRODUCT='Harmony' (and don't press Enter) for the
"Arguments" value in the STAX Monitor, it will work fine.
--------------------------------------------------------------
Sharon Lucas
IBM Austin, [email protected]
(512) 286-7313 or Tieline 363-7313
From: Cindy Zhu <[email protected]>
To: "[email protected]"
<[email protected]>,
Date: 02/16/2012 11:17 AM
Subject: [staf-users] Passing arguments from STAX Job Monitor
Hi,
I have a very simply STAX job as follows:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM
"D:\DistributedTesting\SilkTestDistribution\stax.dtd">
<stax>
<script>
VERSION = '3.1.0.102'
PRODUCT = 'Harmony'
BUILD = 'MainBuild'
BRANCHVER = 'REL30x'
TESTHOST = '1693W7.Fekete.com'
</script>
<defaultcall function="main" />
<function name="main" scope="local">
<script> scripts='D:\\Silk\\Apps\Harmony'</script>
</function>
</stax>
I ran this STAX job from STAS Job Monitor, I passed argument
PRODUCT=’Harmony’ in the STAX Job Parameters ->FUNCTION->Arguments, and I
got the following error:
When I passed the argument from the command line, it worked fine though.
Please help.
Thanks,
Cindy
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users
<<image/png>>
------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________ staf-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/staf-users
