Operational Decision Manager (ODM) stage Execution Object Model types in DataStage
The Operational Decision Manager (ODM) stage connector can use either the Dynamic Execution Object Model (Dynamic XOM) or Java™ Execution Object Model (Java XOM). The connector does not support ruleset parameters with a combination of the Dynamic XOM and Java XOM types. All the parameters of the ruleset must be based on the same XOM type, so the XOM type property is associated with the stage and not the link.
Java XOM
To configure the stage for Java XOM mode, the XOM type stage property must be set to Java XOM. If the configuration wizard is used to import ruleset parameters and configure the stage for a ruleset based on the Java XOM, the wizard automatically sets XOM type property on the stage to Java XOM.
When the Java XOM option is selected, the Ruleset parameter class link property value must be specified. The specified value represents the Java type of the ruleset parameter that is associated with that link. If the specified type is one of the basic Java types that are supported by the connector, a single column on the link corresponds to the entire ruleset parameter. Otherwise, the columns on the input links correspond to the arguments of the methods of the Java class of ruleset parameter and columns on the output links correspond to the return values of the methods of the ruleset parameter Java class. For information about basic Java types in the context of the connector refer to the topic Basic Java types and methods.
Dynamic XOM
The connector supports invoking rulesets that are based on the Dynamic XOM. In this mode, the ruleset parameter values are XML documents. The XML documents must be valid in respect to the XML schema documents that were used to define the XOM for the ruleset.
To configure the stage for Dynamic XOM mode, the XOM type stage property must be set to Dynamic XOM. If the configuration wizard is used to import ruleset parameters and configure the stage for a ruleset based on the Dynamic XOM, the wizard automatically sets XOM type property on the stage to Dynamic XOM.
When the stage is configured for Dynamic XOM, the connector reads one record from each input link, produces XML documents from those records, and invokes the ruleset and passes the produced XML documents as the values for IN and IN_OUT parameters of the ruleset.
When the connector reads a record from an input link, it searches for the field in the record that contains the XML data from which to create the XML document value for the ruleset parameter. The entire XML document must be stored in a single field of the record. The remaining fields of the record can be used as key columns values to correlate records across multiple input links, or they can be fields that the connector propagates from input links to output links.
The column on the input link to be used for the XML documents for ruleset parameters must be
identified so that the connector has access to the field in each retrieved record on that link that
contains the actual XML data to be used as the ruleset parameter value. The identified column must
be of a character-based DataStage® data type:
Char, VarChar, LongVarChar, NChar, NVarChar, and LongNVarChar. If there are multiple such columns,
only one of them must have the Description attribute value that includes the
CC_JRules();
expression. The Description attribute is
present in the columns tab that is visible after clicking any of the input or output links in the
stage. If, after these conditions are checked there are zero or more than one eligible columns on
the link, the job fails with an error.
The batch mode is not supported when the connector is configured to invoke ruleset based on Dynamic XOM. The batch size of 1 is implicitly used in this case. The connector does not support passing multiple XML documents in a single ruleset parameter value.
The key mode is supported by the connector that is configured to invoke ruleset based on the Dynamic XOM. In this case, the specified key columns can be used for sorting and partitioning of input records across multiple input links and multiple processing nodes of the stage, to ensure that the connector is always invoking the ruleset with the correlated XML document values across all IN and IN_OUT parameters of the ruleset.