Follow the instructions below to add an analytic script to WSO2 BAM.
1. Log on to the Business Activity Monitor Management Console and select "Analytics -> Add" in the "Main" menu. The "Script Editor" window opens.
2. Provide a script name and add the required HiveQL script in the editor pane as shown below.
Note
For information on writing HiveQL scripts, refer to https://cwiki.apache.org/confluence/display/Hive/LanguageManual.
3. Click "Run" to execute the script and view results if required. The results will be shown in the panel below the script editor as follows.
4. Click "Save" to save the script. Click "No" in the pop up dialog box if it is not required to schedule the script immediately. Else click "Yes" to schedule the script before saving. For more information on scheduling, refer to section Scheduling a Script.
5. The script will be redirected to "Available Scripts" page where saved script are listed as below.