Samples
This section provides an overview of the samples shipped with WSO2 SP to help you understand the capabilities of WSO2 SP and well as WSO2 Siddhi. These samples can be accessed and run via the WSO2 Stream Processor Studio.
Sample list
To view the complete list of WSO2 samples, click here.
Running a sample
To access and run a sample from the WSO2 Stream Processor Studio, follow the steps below.
Navigate to the
<SP_HOME>/bindirectory and issue the following command to start the WSO2 Stream Processor Studio.For Windows:
editor.batFor Linux:
sh editor.sh
Access the Stream Processor Studio via the
http://localhost:<EDITOR_PORT>/editorURL. The Stream Processor Studio opens as shown below.All the available samples can be accessed from the welcome-page.
Click on the required sample to open its Siddhi application.
To save the Siddhi application in your workspace so that you can run it, click File => Save. This opens the Save to Workspace dialog box. Click Save.
To run the Siddhi application, click Run => Run. If the application has successfully started, a message similar to the following example is displayed in the output console.
The testing steps differ from one sample to another. Therefore, to test the Siddhi application of the required sample, follow the instructions provided at the top of the relevant Siddhi file as comments. The following is an example.
Once test a sample following the given instructions, you can view the results in the output console.