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

Summary

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

Syntax

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

Description

The isunknown 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 false. That means that a Java attribute of a Java class is never considered uninitialized.

Example

rule TestUnknownValue {
    when {
      ?u: User(address isunknown);
    } 
    then {
       askForAddress(?u);
    }
  };

See Also

isknown