=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
Hi,
I am totally new to STAF/STAX.
I want to run a sub-job from my main XML file in both local and remote
machines.
here are my Main job and Sub-job files.
Main-Job.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<defaultcall function="StartHere"/>
<function name="StartHere">
<sequence>
<job name="'Test'" monitor="1">
<job-file machine="'local'">'C:\\testcase\\test.xml'</job-file>
</job>
<if expr="RC ==0">
<message log="1">'Sub Job %s completed , Status :%s Result:%s'
% (STAXSubJobID,STAXSubJobStatus,STAXResult)</message>
<else>
<message log="1" level="'Error'">
'Sub Job %s failed , RC:%s ,Result:%s' %
(STAXSubJobID,RC,STAFResult)</message>
</else>
</if>
</sequence>
</function>
</stax>
Sub-Job.Xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<defaultcall function = "Main"/>
<script>
machines= ['local','xyz12345']
import os
for machine in machines :
path = "C:\\test"
dirlist = os.listdir(path)
</script>
<function name = "Main">
<iterate var="'machine'" in="machines">
<sequence>
<message>'Sub Job completed Result:%s' % dirlist</message>
</sequence>
</iterate>
</function>
</stax>
My query is that when iam running my main job from stax monitor, i get the
files in the specified directory of my local machine only for both iterates,
whereas the folder test is in both remote and local machine at the specified
path.
Can any1 let me know where i am going wrong or do i need to iterate over
machines in my Main-Job.xml also.
--
Thanks
------------------------------------------------------------------------------
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users