The Stream Processor Studio is a developer tool that is shipped with WSO2 SP to develop Siddhi applications. It allows provides two interfaces to develop Siddhi applications

From source view: This allows you to write Siddhi applications in the Siddhi Query Language. This supports auto-completion, tracking syntax errors and debugging.

From design view:This interface visualizes the event flow of a Siddhi application, and allows you to compose the applications by dragging and dropping Siddhi components to a graph.

Once a Siddhi application is created, you can simulate events via the Stream Processor Studio to test whether it works as expected. You can also run the Siddhi application in the debug mode to detect errors in the Stream Processor logic.

Starting Stream Processor Studio

To start and access the Stream Processor Studio, follow the steps below:

Start the Stream Processor Studio by issuing one of the following commands from the <SP_HOME>/bin directory.

Welcome Page

NewClick this to open a new untitled Siddhi file.

OpenClick this to open a Siddhi file that is already saved in the workspace folder of the Stream Processor Studio. If the file is already opened in a new tab, clicking Open does not open it again. The default path to the workspace directory is <SP_Home>/wso2/editor/deployment.

Try out samplesThe pre-created samples provided out of the box are listed in this section. When you click on a sample, it opens in a new tab without a title.

More SamplesClick this to view the complete list of samples in the samples directory. This allows you to access samples other than the ones hat are displayed by default is the Try out samples section. When you click on a sample, it opens in a new tab without a title.

Quick linksThis section provides links to more resources.

Menu items

This section explains the options that are available in the File, Edit and Run menus.

File menu Items

The File menu includes the following options.

NewClick this to open a new untitled Siddhi file.

Open FileClick this to open a Siddhi file that is already saved in the workspace directory of the Stream Processor Studio. If the file is already opened in a new tab, clicking this menu item does not open it again in another tab. The default path to the workspace directory is <SP_Home>/wso2/editor/deployment.

When a Siddhi file is opened, its source view is displayed by default. To view a design view where the elements of the Siddhi application are graphically represented, click Design View. As a result, a graphical view of the Siddhi application is displayed as shown in the following example.

Import SampleClick this to import a sample from the samples diretory to a new tab. The sample opens in an untitled Siddhi file. Once you save it, it can be accessed from the workspace directory.

SaveClickthis to save an edited or new file to the workspace directory.

Save AsClick this if you want to save an existing saved file with a different name. If you click this for an untitled Siddhi file, the normal save operation is executed (i.e., same operation carried out when you click Save).

Import FileClick this to open a file from a system location. This file is opened in a new tab in the saved state with the same file name with which it is imported.

Export FileClick this to export a saved file to a system location. This is only applicable to Siddhi application tabs that are in a saved state.

Close FileClick this to close a currently active Siddhi application that is already open in a tab.

Close All FilesClick this to close all the Siddhi files that are currently open.

Delete FileClick this to delete the currently active Siddhi file from the workspace directory. Only Siddhi files that are already saved can be deleted.

SettingsClick this to change the theme and the font size used in the Stream Processor Studio. The default theme is Twilight.

Edit menu Items

The Edit menu includes the following options.

UndoClick this to undo the last edit made to the Siddhi application that you are currently editing. Only unsaved edits can be undone.

RedoClickthis to redo the edit that was last undone in the Siddhi application that you are currently editing. The redo operation can be carried out only if you have not saved the Siddhi application after you undid the change.

FindClick this to search for a specific string in the currently active Siddhi application tab.

Find and ReplaceClick this to search for a specific string in the currently active Siddhi application tab, and replace it with another string.

Reformat CodeClick this to reformat the Siddhi queries in the Siddhi application you are currently creating/editing in the source view.

This menu option is only visible when you are working in the source view.

Auto-AlignClick this to horizontally align all the Siddhi components in a Siddhi application that you are creating/editing in the design view.

This menu option is only visible when you are working in the design view.

Run menu Items

The Run menu includes the following options.

RunClick this to start the Siddhi application in the Run mode. Only saved Siddhi applications can be run.

This menu option is enabled only when a Siddhi application is being created/edited in the source view.

DebugClick this to start the Siddhi application in the Debug mode. Only saved Siddhi applications can be run in this mode.

This menu option is enabled only when a Siddhi application is being created/edited in the source view.

StopClick this to stop a Siddhi application that is already started in either the Run or Debug mode.