🌻About semicolons
You may have noticed that after the EL rules, the examples are all followed by semicolons.
But when you actually run it, it can run normally without a semicolon.
Should the semicolon be added?
The EL rules of LiteFlow are extended and encapsulated by depending on the underlying expression language. It can be omitted when expressing a single-line statement. for example:
<chain name="chain1">
THEN(a, b, WHEN(c, d))
</chain>
The following form is also considered to be a single-line expression
<chain name="chain1">
THEN(
a,
b,
WHEN(c, d)
)
</chain>
When using sub-variables, because it is a multi-line expression, a semicolon must be added, otherwise the parsing will fail and an error will be reported. The correct specification is as follows:
<chain name="chain1">
t1 = THEN(a, b);
w1 = WHEN(c, d);
THEN(t1, w1);
</chain>
notice
Official suggestion, whether it is a single line or multiple lines, try to add a semicolon after each expression.
Because the IDEA plugin of LiteFlow will check the grammar, if there is no semicolon after each expression, there will be a red squiggly line to prompt.
For a single-line expression, even if you ignore the syntax check prompt and run it, it can still run normally, but in the scenario of sub-variables, a semicolon must be added, which should be paid special attention.