CommandChain
The CommandChain extends from action abstract class and it's shared across the whole toolkit.
The CommandChain chain all the inside executable units together and execute them one by one.
It assumes that all internal units return true or false. Actually only true will be recognized, all other return code will be treated as continue.
Here is a definition example:
UT.xml contents:
<com.ibm.btt.command.CommandChain id="testTerminatedChain">
<list Injection="commands">
<com.ibm.btt.ut.COMM1 />
<com.ibm.btt.ut.COMM2 />
<com.ibm.btt.ut.COMM1 />
</list>
</com.ibm.btt.command.CommandChain >
Here is an example of how to use it:
UniversalElementFactory uef = new UniversalElementFactory("jar:///ut.xml");
CommandChain cc = (CommandChain) uef.getElement("testCompleteChain");
cc.execute("test");
Go up to