This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, go to https://wso2.com/documentation/.
JavaScript Extension
This extension allows you to include JavaScript functions within the Siddhi Query Language.
JavaScript function
Syntax |
}; |
---|---|
Extension Type | Eval Script |
Description | The <operation of the function> is an operation of the <function name> that is defined in the <language name> language, and the output is returned in the <return Type> specified. |
Parameters |
|
Example |
The above function concatenates two strings and returns the output. The input parameters are automatically input as arrays, and they can be accessed as A stream can be defined as follows.
The eval script defined above can be used in this stream as follows.
|