Conditions and expressions
Conditions represent event definitions, and they outline the circumstances under which a job can be completed. A condition is a recursive data type that allows for multiple conditions within it, all of which need to resolve to true for the Job to allow execution. This complex data type includes several underlying types. For more general information on conditions, visit the concepts section. To view an example of a condition message, visit the Example page. For information about conditions in templates, visit the template tutorial.
Conditions can be either a single expression, or they can be nested and chained using regular boolean operators, such as
Expressions contain comparisons of popular data types, such as integers, unsigned integers, timestamps, booleans, strings, and more.
A value is the simplest type of input used in an expression. In double-sided general expressions, the value can either be a primitive type or a query that gets a primitive type.
General expressions or
GenExpr are used to compare two values using a:
The operators of general expressions vary depending on the value type.
Only values of the same
Type can be compared when writing an expression.
The following operators are used in general expressions when comparing strings.
The following operators are used in general expressions when comparing integers or decimals.
Time expressions are like regular unsigned integer expressions, except they only contain a left value and an operator. The right value is filled by a
Timestamp, depending on the value type.
Time operators can be greater than or less than a specified time.
Blockheights can be specified as a
Unit64 and a number operator.
Queries can be used in expressions as variables. For more information on queries, visit the Query page.
Queries can also be written as boolean expressions, in which a [query selector] is evaluated as a boolean.