A StreamBase module is a set of operators that include input and output streams, and is
described in a single EventFlow file with .sbapp
extension. A module can call another module by means of a Module Reference operator.
For example, a top-level module can have a Module Reference to a second-level module
that is defined in a separate file. The second-level module can have Module References
to third-level modules, and so on. Developing with modules allows you to avoid
replicating code by reusing the same functionality in multiple applications.
The following is a general workflow for working with application modules. Follow the topic links for details on each step:
-
Create a new EventFlow module by selecting
> > . -
As an alternative, you can create a module from a portion of an existing EventFlow module, as described in Extracting a Module.
-
Optionally define parameters for your application and use the parameters in expressions in its operators. You can pass parameter values to the top-level module by means of the
<operator-parameter>
element in the server configuration file. You pass parameter values to called modules as part of the Module Reference in the calling module. See Parameter Overview -
Make sure the top-level module can locate its called modules on the module search path.
-
Make sure any file resources required by operators and adapters in your modules can be located on the resource search path.
-
In the top-level module, reference called modules with a Module Reference, as described in Referencing a Module.
-
If the referenced modules contains parameters, set their values in the Module Reference, as described in Using the Module Reference Component. (This overrides any values for the same parameters previously set in the server configuration file.)
Note
When you use a module in multiple applications, remember that any changes to the called module itself are inherited in every module that references it. Conversely, changing the properties of an individual Module Reference does not change the module or any other applications that reference it.