Functions receive a (possibly empty) list of parameters, perform a computation based on these parameters and return the result. Each function has a name that uniquely identifies it, and possibly a namespace within which it resides. The functions available to an expression depend on the context of expression evaluation – similar to variables.
The following types of functions exist:
Standard functions. These are functions defined by the platform available for use in expressions.
Web Request Functions. These are functions that issue a web request based on parameters provided to them, and return the response received for the web request. Web request functions are defined by the user, including specification of how to build the request based on the provided parameters.
Regardless of function type, all functions can be invoked using the same syntax:
@namespace.name(arg1, ...)where namespace is the namespace in which the function is defined, name is the name of the function to invoke, and arg1, … is a comma-separated list of expressions calculating the values to be passed as the parameters for function invocation.
For example, the expression @math.cos(pi/4) will invoke the cos function from the math namespace (computing the cosine of an angle) on the value computed by looking up variable pi and dividing it by 4.