A conditional structure "If - Then - Else". If the conditions are true, the Then container is executed, otherwise, the Else container is executed.
Name | Description | Accept variable | Required | Since |
---|---|---|---|---|
name | The name of the If | - | - | 6.10 |
description | The description of the If | - | - | 6.10 |
conditions | The list of conditions to evaluate | - | ✓ | 6.10 |
match | The "match" value can be:
any . | - | - | 6.10 |
then | The Then container | - | ✓ | 6.10 |
else | The Else container | - | - | 6.10 |
Use the following syntax to define conditions: [(condition)(, condition)*]
Use the following syntax to define condition: "'operand1 (operator) (operand2)?"
Operator value can be:
equals
==
not_equals
!=
contains
not_contains
starts_with
not_starts_with
ends_with
not_ends_with
match_regexp
not_match_regexp
greater
>
greater_equal
>=
less
<
less_equal
<=
exists
not_exists
If at least one condition of the listed evaluate to true, then execute a request, else execute a delay.
actions
steps
if
name My If-Then-Else
description My description
conditions
"'${variable1}' equals 'value'"
"'${variable2}' equals '2'"
"'${variable3}' == 'string with space'"
"'${variable4}' != stringwithoutspace"
"'${variable5}' not_exist"
"'${variable6}' exist"
"'${variable7}' == ''"
"'${variable8}' equals \"value'with'simple'quote\""
"'${variable9}' equals 'value\"with\"double\"quote'"
"'${variable10}' equals 'value\\'with"simple\\'and"double\\'quote'"
"'' == ''"
match any
then
description My then description
sla_profile MySLAProfile1
steps
request
url http //www.neotys.com/
else
description My else description
sla_profile MySLAProfile2
steps
delay 3m 200ms