IBM Streams 4.3.0

Using the generated artifacts from an ODM to SPL conversion

The artifacts that are generated when you convert your IBM® Operational Decision Manager (ODM) rules to IBM Streams Processing Language (SPL) vary depending on the options that you specify when you convert the rules to SPL.

About this task

The rules compiler generates the following artifacts:

  • A composite named after the rules project. The composite contains one or more operators that will run the rules that were compiled.
    The generated composite contains the logic of all the rules that were part of the rule project. The composite contains 2 input ports:
    Data port
    The input port through which tuple data that must be evaluated against the rules flows. The schema of the port is determined by the ruleset parameters that are specified in the rule project and the direction of the parameters.

    Any ruleset parameters with a direction of IN or IN_OUT are added in sequential order to the input port schema.

    Control port
    The control port through which a user can provide updated rules. For more information, see Updating rules at runtime.
    This port is generated only in the following situations:
    • You do not specify the -norup option from the command-line
    • You select the Support dynamic rule update option in Streams Studio

    The composite also contains an output port. The schema of the port is determined by the ruleset parameters that are specified on the rule project and the direction of the parameters. Any ruleset parameters with a direction of OUT or IN_OUT are added in sequential order to the output port schema.

    The composite contains at least one operator. If you specified the -pkg option from the command-line or the Split rule set by package option in Streams Studio, the composite contains one operator for each rule package. Additionally, the composite will run the rule logic for all of the rules within that rule package.

    You can use the composite the same way that you use any other artifact within your IBM Streams application. However, to use the composite, you must add the com.ibm.streams.rulescompiler toolkit as a dependency to your application.

  • If you specified the -types option from the command-line or the Generate type definitions option in Streams Studio, the compiler generates an SPL file that contains the SPL equivalent of the business object model (BOM) types that are used in the rules project.
  • If you specified the -func option from the command-line or the Generate function definitions option in Streams Studio, the compiler generates an SPL file that contains the SPL function stubs for the Java methods that are used in the original set of rules.
    Important: You must manually enter the implementation logic.