• 1Installation
  • 2Preliminary Knowledge
  • 3FlowScript
  • 4Flow Func Signature
  • 5Variable Assignment
  • 6Function Invocation
  • 7Return Statement
  • 8If Block
  • 9For Block
  • 10While Block
  • 11Break and Continue
  • 12Switch Block
  • 13Recursion
  • 14Flow Debug

Flow.apex

  • Docs
  • Tutorials
Getting started with Flow.apex

Variable Assignment

We can do variable assignment in Flows.

Flow f = new Flow()
    .inputAs('a', 'b').returnInteger()
    .var('num = 0');

Here we created a local variable num with the value of 0.

Flows have global variables and local variables. Any variable that is passed from outside is a global one. Any variable that is created inside the Flow is a local one. Variables cannot share the same names, so there is no variable overridden in Flow.apex.

Done