Difference between revisions of "Core.Actions.Branch"

From emotive
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Core]]
+
{{DISPLAYTITLE:OTX '''Branch'''}}[[Category:Core]]
 
== Classification ==
 
== Classification ==
 
{{ClassificationActivity | Branch | IfElse activity to the conditional execution of processes | [[Compound Node]] | [[Core|OTX Core library]] | [[Compound node related actions]] | - | - }}
 
{{ClassificationActivity | Branch | IfElse activity to the conditional execution of processes | [[Compound Node]] | [[Core|OTX Core library]] | [[Compound node related actions]] | - | - }}
Line 27: Line 27:
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| Condition | [[Boolean]] | [[Term]] | - | [1] | Boolean expression (term) which contains the condition. The conditions are necessary until on the last branch and are evaluated from left to right. }}
+
{{TableRowPropertie1| Condition | [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | [[Term]] | - | [1] | Boolean expression (term) which contains the condition. The conditions are necessary until on the last branch and are evaluated from left to right. }}
 
|}
 
|}
  
Line 48: Line 48:
  
 
== See also ==
 
== See also ==
[[Loop]] <br/>
+
[[Core.Actions.Group|Group]] <br/>
[[Group]] <br/>
+
[[Core.Actions.Loop|Loop]] <br/>
[[Parallel]] <br/>
+
[[Core.Actions.Parallel|Parallel]] <br/>
[[Handler]] <br/>
+
[[Core.Actions.Handler|Handler]] <br/>
[[MutexGroup]]
+
[[Core.Actions.MutexGroup|MutexGroup]]

Latest revision as of 08:59, 16 February 2016

Classification

Name Branch
Short Description IfElse activity to the conditional execution of processes
Class Compound Node
Extension OTX Core library
Group Compound node related actions
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

if (BooleanTerm)
{
   ...
}
else if (BooleanTerm)
{
   ...
}
else
{
   ...
}

Description

The OTX Branch activity is used for conditional execution of processes. It corresponds to the General "If-ElseIf-else" statement. One or more branches with a condition (condition) can be defined within the activity.

The Conditions are evaluated starting one from left after the other. The first branch in which evaluates true, is executed. None of the conditions is true, an optional branch without a condition (the last on the right side) is running. Not a branch without a condition exists in this case no action is performed by this activity.

Properties

Name Data Type Class Default Cardinality Description
Condition Boolean Term - [1] Boolean expression (term) which contains the condition. The conditions are necessary until on the last branch and are evaluated from left to right.

OTL Examples

String str;
String Location = "Germany";

if (Location=="Germany")
{
   str = "Hallo Welt!";
}
else
{
   str = "Hello World!";
}

Hmi.ConfirmDialog(str, "Open Test Framework", @MessageTypes:INFO, NULL);

See also

Group
Loop
Parallel
Handler
MutexGroup