🧬For component
LiteFlow provides For component since v2.9.0. Returns the number of loops. Mainly used for FOR...DO...
expressions.
For the usage of FOR...DO...
expressions, please refer to the chapter on Loop mode.
You can define it as follows:
<chain name="chain1">
FOR(f).DO(THEN(a, b));
</chain>
The definition of the f node needs to inherit NodeForComponent
and implement the processFor
method:
@LiteflowComponent("f")
public class FCmp extends NodeForComponent {
@Override
public int processFor() throws Exception {
//here to return the result of for
}
}
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