Call Expression Functions
The FlowForce expression language includes a number of functions that can be used to perform basic operations (primarily, handle values returned by execution steps). You can call these functions from any context where FlowForce expressions are valid (for example, by typing them inside text boxes that represent parameters of a function).
FlowForce expression functions should not be confused with the FlowForce built-in functions. Built-in functions are called from FlowForce execution steps (that is, they are executed as steps), while expression functions are called from FlowForce expressions. |
As a typical scenario to call expression functions, let's consider the job illustrated below, which consists of two execution steps.
The first step executes a shell command (namely, it outputs the text "Hello, World!"). Notice that the data type returned by this step is "as result". The returned value is declared as var1.
The second execution step calls the /system/compute-string built-in function. We called this function in order to convert var1 to a string. The expression itself is embedded into a string field (which is indicated by the curly braces), and it calls two nested expression functions.
•The function stdout returns the standard output of a shell command, as stream.
•The function content converts the stream value to a string.
Now that the data type conversion is complete, you can further use the string value var2 as required by your job processing logic (for example, send it in an email).
For reference to all available expression functions, see Expression Functions.