It's all about the answers!

Ask a question

How to import more than one function in the STAX Facade file?


Archana Singh (133) | asked Dec 21 '12, 2:46 a.m.
retagged Apr 04 '13, 10:26 a.m. by Lisa Caten (342913)
 We have a RQM-STAX framework developed with the help of RQM team to run our test suites.
Currently, our requirement is to run a function which internally calls few other functions which are defined in the same script. My STAX Facade.xml  file looks like this :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<defaultcall function="myDefaultTask"/>

<function name="myDefaultTask" scope="local">
<function-prolog>DefaultTask</function-prolog>

<function-epilog>
This is a description of My Default Task.
</function-epilog>
<function-list-args>
<function-required-arg name="target">The target machine</function-required-arg>
<function-required-arg name="STAXJobXMLMachine">STAXJobXMLMachine</function-required-arg>
<function-required-arg name="file">file</function-required-arg>
<function-optional-arg name="arg1" default="'default1'">The first arg description</function-optional-arg>
</function-list-args>

<sequence>

<!--<message>'Found system name : %s' % target</message> -->
<!-- Import and invoke the legacy task -->
<import machine="STAXJobXMLMachine" file="file"> 
   <import-include>['MainFunction']</import-include>
</import>
   <call function="'MainFunction'">[target,arg1]</call>
<return>0</return> 

</sequence>
</function>
</stax>
but fails with the error saying, the underlying functions are not defined.
Hence, should the solution to this problem be to add all the underlying functions which this main function calls into the <import-include></import-include> tag?
Something like this:
<!--<message>'Found system name : %s' % target</message> -->
<!-- Import and invoke the legacy task -->
<import machine="STAXJobXMLMachine" file="file"> 
   <import-include>['MainFunction','Init','SystemData','CopyCommonDirectories','Copy','ExecuteTest','CopyDirectory','CopyFile','CreateDirectory','GetArchUnix','GetArchWindows','CopyJREs','GetOSDir','Copy64BitJRE','CopyAndExtract','FullUnixPermission','CopyRec']</import-include>
</import>
   <call function="'MainFunction'">[target,arg1]</call>
<return>0</return> 


Kindly let me know if I am thinking in the right direction?

One answer



permanent link
Tory Jaskoviak (52015) | answered Apr 02 '13, 10:46 a.m.
JAZZ DEVELOPER
Hi Archana,

Not sure if this helps but here is a link to the RQM STAF/STAX page: http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0/index.jsp?topic=%2Fcom.ibm.rational.test.lm.doc%2Ftopics%2Fc_int_stafstax.html.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.