Contents
This topic describes how to run and stop a StreamBase EventFlow or StreamSQL application or a StreamBase deployment file from StreamBase Studio.
To run your application with non-default settings, see Editing Launch Configurations.
To debug your application, see Debugging Overview.
A StreamBase application can only be run when it is:
-
Saved to disk
-
Free of typecheck errors
See Typechecking to learn how to recognize and correct typecheck errors in your application.
There are two ways to tell when an application is currently running:
- Application tab in the Editor window
-
-
A small green triangle is overlaid on the icon in the running application's Editor tab. The triangle disappears when you stop the application.
-
A currently running text message is shown in the information bar at the top of the Editor canvas of the running application, including the full StreamBase URI and container name.
A message about Another application is shown in the information bar of other Editor sessions, as illustrated below.
Notice that the information bar can be collapsed to an icon by clicking the arrow on the right side. Click the icon's arrow to restore the information bar.
-
- StreamBase icon in the lower left corner of Studio window
-
When no application is running, the icon is not active. When an application is running, the icon acquires a small green triangle. To see the name and location of the running application and its server port, hover your mouse over the icon. When running a deployment file, the hover text shows the application specified to run in the
default
container.
Every run of a StreamBase application occurs in the context of a launch configuration that defines the parameters for the run. You can specify a custom set of runtime parameters and save them as a named launch configuration, as described in Editing Launch Configurations.
StreamBase Studio also provides a default launch configuration, which allows you to run your application right away without stopping to edit a custom launch configuration.
To run an application on the local StreamBase Server using the default run configuration, first make sure your application or deployment file is currently active in its Editor view, and is saved and free of typecheck errors.
Note
f one EventFlow application references a second EventFlow application in the same subfolder within a project, to run the application you must add the subfolder to the module search path. One symptom of failing to do this is receiving a "module not found" message from the debugger when attempting to step into a referenced module. This behavior differs from StreamBase Studio 7.3.x and previous releases, in which applications in subfolders that referenced other one could run without adding the subfolder to the module search path.
Then use any of these methods:
-
Click the Run button () on the toolbar. This runs or re-runs the EventFlow, StreamSQL, or deployment file in the currently active Editor view.
-
Press Ctrl+F11.
-
Alt+Shift+X, B. That is, press and hold the Alt, Shift, and X keys at the same time. Release them, and immediately press the B key.
-
Select
→ → from the top-level menu. (This option only appears in the Run menu if the currently selected Editor view is an EventFlow, StreamSQL, or deployment file editor.) -
Right-click in the canvas of your application in its Editor view, and select
→ from the context menu. -
Right-click the name of your top-level application's EventFlow, StreamSQL, or deployment file in the Package Explorer view, and select
→ from the context menu. -
Click the down-arrow next to the toolbar's
button, and select → from the menu.
When you run an application with the default configuration, no entry is placed in the
→ list.Use the Run Configurations dialog to edit, name, and save a run configuration. See Editing Launch Configurations.
To run an application with a custom configuration, invoke the configuration's name in one of the following ways:
-
Open the Run Configurations dialog as described in Open a Launch Configuration Dialog. Select the name of the launch configuration in the contents pane on the left, then click the Run button.
-
Select
→ → from the top-level menu. -
Click the down-arrow next to the toolbar's
button, and select your configuration's name from the menu.
If the specified application has any unsaved changes, StreamBase may display the Save and Launch dialog.
The Save and Launch dialog offers to enable the Eclipse feature that automatically saves applications before running them. This dialog is displayed when the Auto-save Options in your Studio preferences is set to Ask me next time (its default setting).
The dialog displays a list of the EventFlow, StreamSQL, or Deployment File Editor sessions for files associated with the application you are trying to run. The check boxes are pre-selected for files that need saving before the run request can proceed. You can clear the check boxes for support files such as feed simulation files, but you must allow the top-level EventFlow, StreamSQL, or deployment file to be saved before running it.
If you select the Always save resources before saving
check box, Studio changes the Auto-save option in your
workspace preferences to Save without prompting
. The
next time you run an application or deployment with unsaved changes, it is
automatically saved and run immediately.
Cancel dismisses the dialog and the application is not run.
By default, running an application causes StreamBase Studio to switch from the SB Authoring perspective to the SB Test/Debug perspective. (If you do not want this to happen automatically, you can change it in Studio Preference Settings.)
To stop a running application, follow these steps:
-
Select the Editor tab for the running application.
-
Stop the selected application with one of these actions:
-
Press the F9 key.
-
Select Stop StreamBase Application from Studio's Run menu.
-
Click the Stop the Running StreamBase Application icon on the toolbar.
-
Stopping an application also stops any feed simulations that may be running to test the application.
By default, stopping an application causes Studio to switch back to the SB Authoring perspective. You can change this behavior in Studio Preference Settings.