There are several alternatives available to help with this which may used separately or together to improve StreamBase Studio's use of fragment configuration in a TIBCO Streaming project.
A. Turn OFF Build Automatically
In StreamBase Studio, when automatic typechecking interferes with other activities, you may turn it off using the menu:
Project > Build Automatically, as found here:
Some minimal typechecking will still occur with "Build Automatically" turned off, but this setting does prevent any errors from begin registered in the "Problems" view and require further cleaning.
You may then typecheck on-demand using the "Refresh" (F5) key when an EventFlow Editor is the current view, or "Refresh Project Typecheck Environment" (Control-F5) key.
NOTE: To remove errors from the Problems View, there are two actions which may be needed: a) With an EventFlow Editor active for a module in the project, use menu:
Project > Clean..., and in the dialog select that project and click the "Clean" button.
b) Right-click the main project folder in the Project Explorer and choose menu:
Maven > Update..., and by default also performs a "clean" on the projects selected.
B. Use Test Configurations
This allows Studio to use configuration which is correct within the Development environment, and use different configuration when built and deployed.
StreamBase Studio uses any configuration it finds under
src/main/configurations and
src/test/configurations, and for typechecking prefers configurations found in
src/main/configurations.
The first time you run a
.sbapp as a fragment in Studio, Studio creates a Run Configuration for it with default configuration which refers to
src/main/configurations. You may change this at any time later to only reference
src/test/configurations, and as long as there is NO configuration in
src/main/configurations, the configuration from
src/test/configurations will be used. (If you do not change the Run Configuration, then when launching the fragment in the "Test/Debug" perspective the configuration from
src/test/configurations will NOT be used.
If when run, the application reports error "
Reference to undefined parameter" and stops, the Run Configuration created for a fragment references the configuration path where configuration is not found.
To resolve this, edit the Run Configuration, Main tab, to select the appropriate project path here:
C. Use Default Parameter Values and Substitutions When Deploying
This allows the configuration to present to Studio values that are correct within the development environment and values for deployment configuration to be determined later when the node is installed.
This is described on the product documentation page:
TIBCO Streaming > Configuration Guide > HOCON Configuration Introduction > HOCON Substitution Variables Supply substitutions when running '
epadmin install node' by adding the command-line parameters:
substitutions="name=value,name2=value2" or
substitutionfile=mysubstitutions.prop where "
mysubstitutions.prop" has the format:
name=value name2=value2
(You may use any filename for the properties file, as long as it has this format.)
What NOT to do...
Do not put engine configuration in the EventFlow fragment
src/main/configurations if that fragment may be used with other fragments in the same deployment Application Archive (the same node). Doing so is likely to conflict with the configuration supplied by the other fragments. Use configuration from
src/test/configurations while developing. Then in the Application Archive project, supply a single
sbengine or
lvengine configuration in that project's
src/main/configurations which satisfies the requirements of all included fragments.