Only functions that take a single (non-List) input and that have a single (non-List) output are allowed to be Converters. Only one Converter can be registered for a given pair of input/output types. If there are many Converters that can handle an input/output type pair, only the most recently loaded one will be registered and a warning message will be logged. Converters are loaded upon start up of the system, or when a module is imported/deleted, or when a Function is edited and saved.
If you know that your Function will output the same value given the same Time Range and Function parameters, then you can avoid the redundant calculations by checking the Cache Results checkbox in the Function editor for the Function Definition in question.
From within a JavaTM, Script or a Script with Map Function, a special FunctionHelper class is available for accessing additional information. See the javadoc for that class for more details on what information is available.
For Java Functions, FunctionHelper objects are passed as a parameter to the specified Java method.
For Script or Script with Map Functions, the FunctionHelper class is accessible through the reserved script parameter, functionHelper. To make things easier, the argument values of function parameters can also be accessed by directly referencing the name of the parameter. The reserved script parameters are also available:
resourceBundle: The Java Resource Bundle for the current locale with strings loaded from the module’s file strings.properties (uploaded using the Files tab available under Configuration > Definitions).
specificTimeRange: The current SpecificTimeRange. This value should always be passed when you access property values of any time-sensitive data object. For example:
Since these parameter names are reserved, they cannot be used as the name for declared Script or Script with Map Function parameters. The reserved script parameters should be referenced using the same notation used for other script parameters.
For Java Functions, these are available via the corresponding getter methods of the FunctionHelper parameter. The table shows the methods in FunctionHelper:
Returns the ResourceBundle for the current Locale, loaded from the strings.properties file in the module to which the function belongs.
Returns a SpecificTimeRange whose start/end dates are computed based on the TimeRange when the function was invoked.