...
To implement a custom function extension, create a class extending "org.wso2.siddhi.core.executor.function.FunctionExecutor" and create an appropriate .siddhiext extension mapping file, compile the class, and build the jar containing the .class and .siddhiext files. Add them to the Siddhi class path. In the case of running them on WSO2 CEP add the jar to the <CEP_HOME>/repository/components/lib
directory.
For example, if you have created with namespace "math" and function name "sin" can be referred in the query as follows:
...