OTX Reference  
OpenTestSystem.Otx.Core.Nodes.Node.EndNode.TerminateLanes Class Reference

Termination of all lanes More...

Inheritance diagram for OpenTestSystem.Otx.Core.Nodes.Node.EndNode.TerminateLanes:
Inheritance graph

Additional Inherited Members

- Public Attributes inherited from OpenTestSystem.Otx.Core.Nodes.Node
System.Boolean disabled
 To turn on/off a node. A deactivated node is not executed at run time. More...
- Public Attributes inherited from OpenTestSystem.Otx.Core.UniversalTypes.NamedAndSpecified
ExtensibleData[] extendedData
 Declares general data for NamedAndSpecified which can be extented by new general data defined in new OTX extensions using the standardised extension mechanism. For example it can be used to specify specification relevant content in a better structured way. More...
OtxId id
 Unique identifier of an element More...
MetaData metaData
 Additional tool-specific data More...
OtxName name
 Name of an element More...
System.String specification
 Descriptive specification More...

Detailed Description

Termination of all lanes

The TerminateLanes end node is exclusively designed for deployment in Parallel node lanes. It allows aborting the execution of all lanes in a Parallel node without having to wait for them to complete normally.

A TerminateLanes Node will only terminate lanes inside the enclosing Parallel node, its nested Parallel nodes and called Procedures. It will not terminate parent parallel lanes of the enclosing Parallel node.

When a TerminateLanes node is executed in one of the lanes of a Parallel node, all other lanes are signaled to complete prematurely.

On receiving a premature completion signal, all lanes will complete immediately after completion of the last atomic node, MutexGroup or Finally block (if any). Atomic nodes are Action nodes with an atomic ActionRealisation as well as the end nodes Return, Break, Continue, TerminateLanes and Throw. Since there is no completion timeout defined for atomic nodes, Finally blocks or MutexGroup nodes, lane completion is delayed no matter how long the node takes to complete. This avoids producing undefined states but implies possibilities of deadlocks. An OTX author is responsible for avoiding deadlock situations.
Terminating a called Procedure using TerminateLanes is not recommended because the behaviour may not be predictable. It is possible that the author of the called Procedure did not expect it to be terminated from the outside at arbitrary positions. Thus, it is recommended practice to pass a flag into the called Procedure, so that the called Procedure can terminate itself in a controlled manner.
// Local Declarations
Integer intVar1 = 0;
Integer intVar2 = 0;
String stringVar1 = "";
// Flow
intVar1 = 1;
intVar1 = 2;
intVar1 = 3;
intVar1 = 4;
intVar1 = 5;
intVar1 = 6;
intVar1 = 7;
intVar1 = 8;
intVar1 = 9;
intVar1 = 10;
stringVar1 = "I may not happen because of the TerminateLanes";
intVar2 = 1;
intVar2 = 2;
Checker rules
CheckerRule.Core_Chk022 - Correct nesting of TerminateLanes node
See also