I need to define a timer with some duration in another timer.But It always taking the duration of outer timer.It is not taking the inner time duration.
Is there any way to define nested time?
Could please through some lights on this.
Thanks
Sarada
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What are the values you are using for the outer and inner timers? Note, if the value of the outer timer is shorter than the inner timer, then it will "pop" before the inner one.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Rankin,
Thanks for your reply.Actually what happens is I have more than one one testcase element under outer timer loop each are performing some specified task.Under one testcase I specified timer with duration period less than the outer loop.After completing the duration it should stop the that task and it will contune with next task.But it is not stopping the task.I am wondering which timer duration it is taking.
Thanks
Sarada P.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Without seeing the job, it's hard to say for sure where things could be going wrong. If by "stop the task" you mean that you don't see the process end (on the remote system), then that may be due to how you have the <process> designed. In particular the <stopusing> definition. STAX will try to stop the process via the method you specify there (or the default, which usually works). However, even in the case where the wrong <stopusing> is definied (and, thus, the process continues to run), the job should still fall back to the end of the enclosing <timer> element.
The following simple job works for me and exhibits the expected behavior.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
I need to define a timer with some duration in another timer.But It always taking the duration of outer timer.It is not taking the inner time duration.
Is there any way to define nested time?
Could please through some lights on this.
Thanks
Sarada
What are the values you are using for the outer and inner timers? Note, if the value of the outer timer is shorter than the inner timer, then it will "pop" before the inner one.
Hi Rankin,
Thanks for your reply.Actually what happens is I have more than one one testcase element under outer timer loop each are performing some specified task.Under one testcase I specified timer with duration period less than the outer loop.After completing the duration it should stop the that task and it will contune with next task.But it is not stopping the task.I am wondering which timer duration it is taking.
Thanks
Sarada P.
Without seeing the job, it's hard to say for sure where things could be going wrong. If by "stop the task" you mean that you don't see the process end (on the remote system), then that may be due to how you have the <process> designed. In particular the <stopusing> definition. STAX will try to stop the process via the method you specify there (or the default, which usually works). However, even in the case where the wrong <stopusing> is definied (and, thus, the process continues to run), the job should still fall back to the end of the enclosing <timer> element.
The following simple job works for me and exhibits the expected behavior.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<defaultcall function="Main"/>
<function name="Main" scope="local">
<sequence>
<timer duration="'2m'">
<sequence>
<message>'Starting outer timer'</message>
<timer duration="'15s'">
<sequence>
<message>'Starting inner timer'</message>
<stafcmd>
<location>'local'</location>
<service>'delay'</service>
<request>'delay 150000'</request>
</stafcmd>
</sequence>
</timer>
<message>'Left inner timer, RC: %s' % RC</message>
</sequence>
</timer>
<message>'Left outer timer, RC: %s' % RC</message>
</sequence>
</function>
</stax>