To use existing STAX task files with IBM® Rational® Quality
Manager,
they either must be modified to follow the format described in "Importing
STAX files", or a facade task can be created.
A facade task is a simple STAX XML file that is used to specify
the basic elements Rational Quality Manager requires
(default call, title, description, arguments, and return code). The
facade task then imports and calls the legacy STAX function.
The facade task must be located in the staxPath directory,
however the legacy STAX XML files (since they do not follow the Rational Quality Manager format)
must be located outside of this directory. In this example, the facade
task is located in staxPath in D:\stax\myLegacyTask.xml and the legacy
task file is located in D:\legacy\myOldTask.xml.<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<defaultcall function="myLegacyTask"/>
<function name="myLegacyTask" scope="local">
<function-prolog>Legacy STAX Task</function-prolog>
<function-epilog>
This is a description of My Legacy Task.
</function-epilog>
<function-list-args>
<function-required-arg name="target">The target machine</function-required-arg>
<function-optional-arg name="arg1" default="'default1'">The first arg description</function-optional-arg>
<function-optional-arg name="arg2" default="'default2'">The second arg description</function-optional-arg>
</function-list-args>
<sequence>
<!-- Import and invoke the legacy task -->
<import machine="STAXJobXMLMachine" file="'%s/../../legacy/myOldTask.xml' % STAXJobXMLFile" import-include="myOldFunction"/>
<call function="'myOldFunction'">[target,arg1,arg2]</call>
<return>0</return>
</sequence>
</function>
</stax>