Reference > Rule Languages > ILOG Rule Language > IRL Keywords > isknown

Summary

Tests whether a class attribute has an initialized value. This keyword is used in any expression.

Syntax

[?var:] className (?attribute isknown);

Description

The isknown keyword can be used in the condition part or in the action part of a rule and in a function. It tests whether the attribute has a value.

In the case of the XML binding, an attribute has no value when:

In the case of Java classes, the test always returns true. That means that a Java attribute of a Java class is always considered initialized.

Examples

rule TestknownValue {
   when {
      ?u: User(address isknown);
   } 
   then {
      sendToAddress(?u.address);
   }
};

See Also

isunknown