Loading Samples in Studio

Sample Types and Locations

Starting with TIBCO® Streaming 10.5.0, StreamBase Studio provides access to five categories of sample and demonstration projects. The first three categories are accessed with the File>Import Samples and Community Content menu.

TIBCO Supported Samples Installed Locally

Your TIBCO® Streaming installation includes over 180 sample Studio projects that illustrate basic StreamBase or LiveView features and adapter usage. Each sample is described in the Samples Guide.

TIBCO Supported Samples from GitHub

A check box on the StreamBase Sample Importer dialog also allows a set of supplemental samples to be cloned locally and intermixed with the locally-installed samples. Samples in this category can be updated between StreamBase releases.

Community Contributed Projects from GitHub

The same check box on the StreamBase Sample Importer dialog clones a separate set of samples contributed by the TIBCO Streaming community. These samples are monitored by TIBCO but not supported, and appear in a separate section of the StreamBase Sample Importer dialog:

Another category of samples are accessed with the File>StreamBase Component Exchange menu:

StreamBase Component Exchange

The Component Exchange provides a set of StreamBase extensions and special case projects that are curated by TIBCO but not supported.

Finally, the SB Demos perspective in StreamBase Studio provides a set of demonstrations of StreamBase and LiveView functionality in a self-running demonstration environment. See SB Demos Perspective.

Using the StreamBase Sample Importer

To load a sample into StreamBase Studio:

  1. From Studio's top-level menu, select File>Import Samples and Community Content.

    You can resize the dialog as needed.

  2. The dialog first opens with all categories collapsed, as shown above.

    To locate a sample of interest, you can:

    • Type a search string in the type filter text field.

    • Open the categories of interest and browse each list.

  3. Select one or more samples from the Load Sample Projects dialog. While clicking, hold the Ctrl key (Windows) or command key (macOS) to make a multiple selection.

  4. Specify whether or not to open the README.html or Eclipse Cheat Sheet (if provided) for the selected samples. Studio remembers your setting of this option.

  5. When opening a LiveView sample, specify whether to open the LiveView Project Viewer for the selected samples (recommended).

  6. Click Import Now.

The samples you load have the following characteristics:

  • The Load Sample Projects dialog remembers the collapsed or expanded state of the category lists.

  • StreamBase Studio creates a separate project for each sample you load.

    • Exception: for the Operator sample group, Studio creates a single project and all the individual operator's sample modules are imported into the same project folder.

  • You can reload any sample any time. If your workspace already has a copy of that sample, Studio creates a new copy, appending a number to the new copy's project folder name. This lets you load several copies of the same sample to experiment in different ways.

Using the GitHub Content

You can enable and disable the GitHub content from the StreamBase Sample Importer dialog by selecting or clearing the Include community samples check box:

The first time you enable this content, Studio prompts for license approval, then performs a git clone operation to place both supported samples and community projects into two local clone folders. Click the Open repository link to go to the local clone if you need to. A similar link is on the StreamBase Studio panel of Studio Preferences.)

Thereafter, you can clear and re-select this check box to clear the GitHub content from appearing in the dialog. However, the local clone remains in place unless you explicitly delete it with system commands.

Use the Pull from remote repositories now link to perform a git pull operation on your local clone folders to update them with any changes made since your last clone or pull operation.

Studio uses the same local clone location for all releases. When you install a new StreamBase release, be sure to use the Pull from link to obtain the new release's matching GitHub changes, if any.

Note

Sample projects from the GitHub repository are compatible with StreamBase Studio but are not necessarily designed to be Studio development projects. Such projects can be run from the command prompt with mvn install commands.

When importing samples from the GitHub repository, be sure to select the Open selected sample's readme check box, which causes the sample's Markdown README to be converted to HTML on import into Studio.

Use the Select Versions button to select among a sample's versions, if any are available.

Samples Imported into Workspace

The StreamBase Sample Importer dialog always imports samples, whether of local or GitHub origin, into the current Studio workspace. See Default Installation Directories for that location for your platform.

Do not try to run the local samples from their installed location, which is likely to be in a folder for which you do not have write access. Always import samples into Studio, and use the Studio workspace location, even if running them from the command prompt.

Rebuilding Samples on Windows

A small number of StreamBase samples, such as client and buffering, have C++ and Java code that can be modified and rebuilt. In order to rebuild the C++ executables on Windows, you must have one of the supported Microsoft Visual Studio versions installed as described on Supported Platforms.