🧿Break component
Starting from v2.9.0, LiteFlow provides break component. Returns a Boolean value for the loop count. Mainly used for FOR...DO...BREAK and WHILE...DO...BREAK expressions.
For the usage of these two expressions, please refer to Loop mode.
It can be defined as follows:
<chain name="chain1">
FOR(f).DO(THEN(a, b)).BREAK(c);
</chain>
or
<chain name="chain1">
WHILE(w).DO(THEN(a, b)).BREAK(c);
</chain>
The definition of the c node needs to inherit NodeBreakComponent
and implement the processBreak
method:
@LiteflowComponent("c")
public class CCmp extends NodeBreakComponent {
@Override
public boolean processBreak() throws Exception {
//here to return the result of break
}
}
See the chapter Common Components for the methods that can be overridden and the methods that can be called by the this keyword.
Help us improve this document (opens new window)
last update: 2022/10/13, 00:02:27