inout
The
inout keyword defines a ruleset parameter
that is both an input parameter and an output parameter.
Purpose
The keyword in a ruleset declaration to define a parameter value that is provided as input to a ruleset when it is executed and can be modified by the execution process to produce an output value when the execution is completed.
Context
At the top level of rulesets
Syntax
ruleset rulesetName
{
[in typeName variableName;]
[inout typeName variableName;]
[out typeName variableName [= value];]
};
Description
Ruleset parameters are a simple way to exchange data between the application and the ruleset. Ruleset parameters are accessible from a rule, a function, or a task definition in the ruleset.
Rulesets support three types of parameters: in, inout,
and out.
You cannot specify an initial value
in the ruleset for the in and inout parameters
because they are initialized by the IlrContext#setParameters(ilog.rules.engine.IlrParameterMap) method. However,
you can initialize the out parameter.