Running Applications in Studio

This topic describes how to run and stop a StreamBase EventFlow or StreamSQL application from within StreamBase Studio, using the default run configuration.

If you want to run your application with non-default settings, see Saving StreamBase Run Configurations.

If you want to run and debug your application, see Debugging StreamBase Applications.

Before Running an Application

A StreamBase application can only be run when it is:

  • Saved to disk

  • Free of typecheck errors

See Typecheck Errors View to learn how to recognize and correct typecheck errors in your application.

Launch Configurations

Every run of a StreamBase application occurs within a set of runtime parameters that define parameters for the run. You can specify a set of runtime parameters and save them as a named set, as described in Saving StreamBase Launch Configurations.

StreamBase Studio also provides a default set of runtime parameters, which allows you to run your application right away without stopping for configuration. The instructions on this page show how to run with the default configuration. See Saving StreamBase Launch Configurations to learn about running with a saved run configuration.

Running an Application with Default Configuration

To run an application on the local StreamBase Server using the default run configuration, first make sure your application is currently active in the Editor view, and is saved and free of typecheck errors. Then use any of these methods:

  • Click the Run button () on the toolbar.

  • 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 RunRun AsStreamBase Application (Default Launch) from the top-level menu. (This option only appears in the Run menu if the currently selected editor is an EventFlow or StreamSQL editor.)

  • Right-click in the canvas of your application in the Editor view, and select Run AsStreamBase Application (Default Launch) from the pop-up menu.

  • Right-click the name of your application's .sbapp or .ssql file in the Package Explorer view, and select Run AsStreamBase Application (Default Launch) from the pop-up menu.

  • Click the down-arrow next to the toolbar's Run button, and select Run AsStreamBase Application (Default Launch) from the menu.

Prompts for Unsaved Changes

If the specified application has any unsaved changes, StreamBase may display the following 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 StreamBase editor sessions for files associated with the application you're trying to run. The checkboxes are pre-checked for files that need saving before the run request can proceed. You can uncheck the checkboxes for support files such as .sbfs files, but you must allow the primary EventFlow or StreamSQL application file to be saved before running it.

    If you check the Always save resources before saving checkbox, Studio changes the Auto-save option in your workspace preferences to Save without prompting. The next time you run an application with unsaved changes, it will be 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 StreamBase Studio Preferences.)

How to Tell Which Application is Running

There are two easy ways to tell when an application is open and 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 placed at the top of the Editor canvas of the running application. A message about Another application is placed at the top of other application Editor sessions, as illustrated below.

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.

Stopping a Running Application

To stop a running application, follow these steps:

  1. Select the Editor tab for the running application.

  2. 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 you may have 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 StreamBase Studio Preferences.

Back to Top ^