For global functions that run on the server side, the implementation Java class of the global function must be registered in the btt.xml file so that it can be invoked at runtime.
In the btt.xml file, search for globalFunctions, and then add a new entry for the implementation class. The ID of the entry should be the same as the name that is used for registering the global function for tooling, and the value should be the implementation class. In the following code sample the line that is marked in bold is an example of registering a global function for runtime.
Note The global function class must be added in the referenced library of runtime project.
Registering the implementation class of a global function in the btt.xml file
For global functions that run on the browser side, global functions are mapped Javascript object automatically; therefore, the object name of the Javascript implementation should be the same as the name that is used for registering the global function for tooling.