Editing EventFlow Run Configurations

Open a Run Configuration Dialog

Open the Run Configuration and Debug Configuration dialogs using any of the following methods:

  • Select RunRun Configurations from the top-level menu (or RunDebug Configurations).

  • Select Run Configurations from the drop-down arrow next to the Run () button in the Studio toolbar (or next to the Debug () button).

  • Right-click in the EventFlow Editor canvas for your module. From the context menu, select Run AsRun Configurations.

  • In the Project Explorer, right-click the name of your application's EventFlow module. From the context menu, select Run AsRun Configurations.

Run configurations are stored as metadata in your Studio workspace. Thus, by default, your set of named run configurations is common to all your StreamBase projects. However, a run configuration includes the pathname to the individual module, so you cannot share run configurations among StreamBase modules.

Create a New Run Configuration

Studio automatically creates a new run configuration for you the first time you run or debug a module, with the configuration taking the name of the top-level module being run. These run configurations are created with default settings, and you can edit or copy them to specify custom settings.

You can also create a new run configuration from scratch. To do this, open the Run Configurations or Debug Configurations dialog and do one of the following:

  • In the left pane, right-click EventFlow Fragment and choose New in the context menu.

  • In the left pane, select EventFlow Fragment and click the New toolbar button.

  • Select the name of an existing run configuration and click the Duplicate toolbar button.

Edit an Existing Run Configuration

A named run configuration does not yet exist for an EventFlow project until you have run the EventFlow fragment for that project at least once.

To edit an existing run configuration:

  • Open the Run Configurations or Debug Configurations dialog.

  • Select the name of the configuration to edit.

  • Make changes in the tabs of the wizard and click the Apply button before you leave each tab.

  • Click Revert to undo changes since the last saved version.

Note

The Run Configurations or Debug Configurations dialogs restart showing the last configuration you opened. This is not necessarily the configuration for the EventFlow module whose name was active when you invoked the Configurations dialog.

After applying your edits, you can:

  • Click Close to preserve your edits and exit the dialog.

  • In the Run Configurations dialog, click Run to run the edited run configuration.

  • In the Debug Configurations dialog, click Run to run and debug the edited run configuration.

Main Tab

Name

A configuration name is generated for you when you first run an EventFlow fragment. You can change the name according to your site's standards. The name you enter is not reflected in the navigator pane on the left until you click Apply.

Main EventFlow Module

Specify the path to the StreamBase EventFlow module file to be run or debugged. Paths are measured from the root of the current Studio workspace. The easiest way to enter the correct path format is to browse for a module using the Browse button. The resulting dialog shows a list of all EventFlow modules in your workspace. Select the module of interest and click OK.

StreamBase engine port number

This control specifies the Client API listening port for the StreamBase server that runs as part of every EventFlow fragment launch. Choose one of the following options:

Configuration or default

This control specifies that the StreamBase listening port is assigned by a configuration file of type sbclientapilistener in the project's src/main/configurations folder. Or if no configuration file sets the StreamBase port for this project, then the default value of 10000 is used.

Any available

Select this control to specify any port not currently in use. This control is the same for Studio as setting portNumber = 0 in a configuration file.

Specified

Select this control to specify a particular port number for this EventFlow project's StreamBase server.

Debug port number

By default, StreamBase uses 8000 as the default port. You can optionally specify a different debug port number, as required.

Configuration files

Specify which configuration files to run or debug. By default, all configuration files are selected. If your project contains more than one configuration file of the same type, specify only one per type (for example if your project contains two configuration files of type sbengine).

Specify which configuration files to use in the next run or debug launch of this EventFlow project. By default, all configuration files in src/main/configurations are selected. If your project contains more than one configuration file of the same HOCON type, specify only one per type. For example, if your project experimentally contains two configuration files of type sbengine, the launch halts with a runtime error. Select which configuration file to use for the next launch from Studio.

Advanced Tab

StreamBase Engine Logging Level

Select Use Default to specify using Studio's default global logging level, which is generally INFO level, or level 0. Remember that adapters and some operators can set an independent logging level.

Select Specified to override the global logging level. The higher the log level number you specify, the more messages and message types are sent to the Console View and/or to an output log file, if specified. The numeric run levels correspond to the following level names:

0 — INFO
1 — DEBUG1
2 — DEBUG2
3 — TRACE
VM arguments

Arguments that you specify here are used as command line arguments for the JVM engine that hosts the EventFlow fragment. Click Variables to invoke the Select Variable dialog, from which you can build a VM argument setting using Java standard system property names.

In general, set StreamBase properties with a HOCON configuration file instead of the VM arguments control. Use this feature sparingly, or under the direction of TIBCO Technical Support.

Parameters Tab

Engine name

The next EventFlow fragment launch defined by this configuration has a default engine name generated by Studio. The Default setting is appropriate in the great majority of cases. You can see the engine name Studio chooses in the Clusters view at runtime. Select the Engine entry of a started node; the Name entry is near the top of the Properties list.

It is possible for a single node to contain more than one engine. For command-line launches, engines and engine name are specified in a HOCON configuration file of type c.t.e.dtm.c.node. Use the Specified option to direct this Studio run configuration to use the same engine name that will be used for command line launches. Valid characters for engine names are letters, digits, underline, hyphen, period, and dollar sign.

Deploy parameters

Set name-value pairs in the Deploy parameters field to pass command options to the deployment mechanism when running or debugging the EventFlow module. Deployment parameter options are shown in the following table.

Option Description
adminport The administration port of the node that should be used to run the fragment.
buildtype This option specifies the type of binaries the engine uses. The valid values are PRODUCTION or DEVELOPMENT. If not specified, the engine uses the same binary type as the node it runs in.
debug An enumeration indicating the level of diagnostic output. The valid values are enable ― a high level description of the deploy tool activity, verbose ― detailed description of deploy tool activity, or disable ― no diagnostic output. (default: disable).
discoverytimeout The number of seconds to wait while resolving a servicename. Sub-second precision is supported. For example 1.25 (default: 1).
displayversion A boolean flag indicating whether the product version information should be displayed (default: true).
enginename The name to assign to the engine that hosts the fragment. Engine names can only include the characters a-zA-Z0-9_-.$. Fragment deployment fails if an engine already exists with this name (default: a unique generated name). This name is also used to search for engine-specific deployment directories when the engine starts.
exitonfailure Control multi-node completion behavior. A value of true causes the deploy tool to return to the caller when any node returns a non-zero exit code. A value of false causes the deploy tool to not return until all nodes exit. (default: false).
hostname The host name running the node that should be used to run the fragment (default: localhost).
ignoreoptionsfile A boolean flag to suppress the default reading of the deployment options file (default: false).
keepaliveseconds The number of seconds that the node should wait before terminating a deployed fragment when connectivity between the node and the deployment environment is lost (default: 10 seconds).
mirrorclient This option, when given a value of true, ensures that the working directory and class paths used by the node match the client. Note this option only works when the client and node are run on the same machine, or reference identical file systems (default: true, when the target nodes are local).
nodecleanup A boolean flag indicating whether the generated artifacts and state should be removed on engine exit. A value of true removes all generated artifacts and state, a value of false does not. (default: true).
password The password to use when authenticating the StreamBase runtime username during the connection to the node. See username below.
prefix A boolean option with a value of true causes output to be prefixed with the nodename. A value of false disables the nodename prefix. (default: true)
reset This option with a value of true requests that all Java objects and any changed type definitions on the node be deleted before the fragment begins execution. If there is an engine already running, an error is reported and the new engine fails to start. (default: false).
schedulerpolicy The Scheduling policy and priority for the engine process. The syntax is policy: priority. The valid values for the policy are SCHED_FIFO, SCHED_RR, and SCHED_OTHER. The valid range for priority depends on the policy. For Linux, the valid values for SCHED_FIFO and SCHED_RR are 1 - 99. If the schedulerPolicy cannot be set, the engine process is not started. In order to use real-time policies, the caller needs the appropriate permissions. On Linux, a security configuration file can be created to allow users to enable real-time policies. As an example, the following command:
cat > /etc/security/limits.d/tibco.conf <<EOF nightly hard \
  rtprio 70 nightly soft rtprio 0 EOF
allows the user nightly to enable either SCHED_FIFO or SCHED_RR with a priority range from 0 to 70. If running as root, you can set the required permission for root, with the following command:
ulimit -r 99
Run this immediately before starting the node, in the same shell that starts the node.
serverdebug Control server diagnostics. An enumeration value that has one of the following values: enable or disable. A value of enable causes additional server debug tracing. A value of disable disables server debug tracing. (default: disable).
serverdebugfilter Internal. Control server diagnostics. A hexadecimal value, starting with 0x.
serverdebugpause Internal. Pause process before JVM is launched. Boolean.
servicename The service name of the node that is to be used to run the fragment. This option may be used instead of adminport and hostname.
shutdowntimeoutseconds The maximum number of seconds to wait for an engine to shut down (default: 60).
suspend If true, require the engine to suspend execution before main() is called during remote debugging. This option only applies if remotedebug=true is specified (default: false).
username The user name in the StreamBase Runtime authentication realm to use when connecting to a node. Note that this is NOT the same user name as the StreamBase, LiveView, or LDAP user name. The specified value must identify a principal with administrative privileges on the node. Defaults to the user.name system property, which is set to be the UID of the user who executed the deploy tool client JVM.
Substitutions

Use this field to define substitution variables, or to specify a file that contains substitution variables. See Substitution Variables for more information on using substitution variables in configuration files.

Take, for example, a configuration file that includes text such as version = ${PROJECT_VERSION}. If you include a name-value pair in the Substitutions table shown in the above image, where the name is PROJECT_VERSION and the value is 10.1.1, then when the LiveView project is run and the configuration file is read, the version = line is read as version = 10.1.1.

Environment Tab

Caution

The settings in the Environment tab have a very different meaning for EventFlow fragment run configurations than for the usual Java run configurations provided by Eclipse. Please read this section carefully.

Remember that all EventFlow fragments are launched into StreamBase Runtime nodes, and that nodes are always part of a StreamBase Runtime cluster. The shell environment for the operating system in which Studio runs is NOT passed to, or available to, fragments running in nodes.

A StreamBase Runtime node has its own environment set by the deployment mechanism. The settings in this Environment tab affect the node's environment at node installation time. This fact has the following consequences:

  • The settings made in this tab can only affect the next node that Studio installs. Remember that Studio installs a node and reuses it for various fragment launches. So even though this tab is part of the configuration for one EventFlow module, if you add or change environment variables in this tab, for them to take effect, you must use the Clusters view to stop and remove the existing node installed by Studio. At the next launch of this configuration, Studio installs and starts a new node with these settings.

  • The environment settings you specify here persist for the life of the next node that Studio installs. This means that these settings apply not only to the EventFlow fragment you are configuring now, but to any other EventFlow or LiveView fragment that is launched into the same node.

  • Settings made in this Environment tab only affect nodes installed and started by Studio. These settings are not carried into command line launches made with the epadmin command. You must repeat any environment settings made here for use with the epadmin command.

The New/Edit Environment Variable dialog contains a Variables button, which is a feature inherited from Eclipse. Use this button to specify the value of an environment variable using one or more Eclipse system variables whose contents are resolved by Eclipse when this configuration is run. Use the Help button on this dialog for further information on each available variable.

The list of variables includes ${sb_home}, which is defined as the absolute file system path of the StreamBase installation directory as currently set in Studio's Preferences dialog.

Common Tab

The settings in the Common tab are common to all Eclipse run configurations. Use Eclipse Help to learn how more about these options.

Save as

This option determines where this run configuration is saved. The default setting, Local file, saves configurations in the workspace metadata area. As an alternative, you can select Shared file to save this run configuration as a file in one of your project folders. In this case, the run configuration is saved as Name.launch, where Name is specified in the Name field. Specify the target project folder using the Browse button.

Display in favorites menu

The favorites menu is a list of run configuration names that appears in the second section of the drop-down menu of the Run and Debug buttons on the toolbar. The first section contains a changing list of recently run configurations. Add a configuration to the favorites section to keep it in the menu, even when other applications have replaced it in the recently-run section. This option performs the same function as the Organize Favorites option in the Run and Debug drop-down menus.

Encoding

Use this section to specify a non-default character encoding for log messages sent to the Console View (and optionally to a standard output file).

Standard Input and Output

Allocate Console is selected by default. This specifies using the Console view to display logging messages written to standard output and standard error.

Input File is not supported by EventFlow fragment launches.

Output File is unselected by default. To specify that standard output and standard error of your fragment's run are written to a log file, select the Output File check box, and enter a path to a file. If the specified file does not exist, it is created for you. If both Allocate Console and Output File options are selected, log messages are written to both places. You must designate the path to the file using Eclipse-specific syntax. Rather than typing a path, use the Workspace or File System buttons to navigate to a workspace or file system folder, and specify a file name. These buttons let Eclipse write the syntax for you. If you are familiar with the Eclipse syntax required in this field, you can use the Variables button to build up a path from components.

Append is dimmed unless the Output File option is selected. Select the Append check box to have log messages appended to the file specified in the Output File field. If unselected (the default setting), the designated file is overwritten with each run of this configuration.

Launch in background

Use this option to specify that the launching process itself runs in the background. (The StreamBase server is always run in the background.) Selecting this box returns control to Studio immediately when you launch this configuration, without displaying the usual Starting Server dialogs.

Perspective Change Preferences

By default, running or debugging a StreamBase module with a run configuration automatically switches StreamBase Studio to the SB Test/Debug perspective, after prompting you to confirm. You can specify on the prompt dialog to not ask again.

The option to switch perspectives is not stored in the run configuration itself, but is a global setting for all StreamBase applications, as specified in Studio Preference Settings.

Back to Top ^