Getting started with Flow.apex
For Block
We support two types of for
blocks in Flow.apex.
Flow f = new Flow()
.inputAs('a', 'b').returnInteger()
.doFor('i = 0; i < 10; i = i + 1', Flow.block()
.var('output = debug(i)')
);
Or
Flow f = new Flow()
.inputAs('a', 'b').returnInteger()
.doFor('i in range(0, 10)', Flow.block()
.var('output = debug(i)')
);