Operators¶
The IF-THEN-ELSE module of a workflow supports the following operators. For some operators various names are available. Upper and lower case of the operator names are ignored.
| Operator | Function |
|---|---|
exists, defined, is defined |
True if the parameter exists and its value is not empty. Wildcards * are supported. For example PLS_STAMP_* is true if at least one parameter starting with PLS_STAMP_ exists. With wildcards, the value of the parameter is not checked. |
matches, =~ |
True if the provided regular expression (RegEx) matches any part of the parameter value. Upper and lower case are ignored. To match the whole value, use ^ and $, for example ^PDF$. |
==, is, eq |
True if the parameter value is the same as the provided value. |
!=, ne |
True if the parameter value is not the same as the provided value. |
<=, le |
True if the parameter value is less or equal the provided value. |
>=, ge |
True if the parameter value is greater or equal the provided value. |
contains |
Same as matches. The provided value is evaluated as regular expression, so characters such as . or * have a special meaning. |
begins with |
True if the parameter value starts with the provided value. |
ends with |
True if the parameter value ends with the provided value. |
true, is true |
True if the parameter value is a true value. True values are all numeric values not equal 0 and these case-insensitive strings: true, t, yes, y, ja, j, x. |
-f, is file |
True if the parameter value is a file. |
-d, is directory |
True if the parameter value is a directory. |
Digital Process Factory treats an unknown operator name like ==. It does not report an error.
Differences to DPF 3.x¶
The following operators behave differently on DPF 3.x:
| Operator | DPF 3.x | DPF 4.x |
|---|---|---|
exists, defined, is defined |
A parameter with an empty value counts as existing. | A parameter with an empty value counts as not existing. |
==, is, eq |
Compares integers as numbers, for example 01 equals 1. |
Always compares as text, for example 01 does not equal 1. |
contains |
Compares as plain text. | Evaluates the value as regular expression. An invalid regular expression, for example (, ends the job with an error. |
| Unknown operator names | The condition is false. | Treated like ==. |