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

Summary

The keyword used to define the filter of an agendafilter in a rule task. This keyword is used in the ruletask definition

Syntax

ruletask ruleTaskName  
{ 
  agendafilter = filter (variableName) 
  { 
      action1 
      ... 
      actionn 
  }
}; 

Description

This format presents a way to define an agenda filter in the rule task. In this case the code of the agenda filter is inlined in the task definition. It can be seen as an IRL function with an ilog.rules.engine.IlrRuleInstance parameter and whose return type is Boolean. The variable in parentheses represents this IlrRuleInstance object. It can be referenced in the inlined code of the agenda filter. Ruleset variables are accessible from the agenda filter code. This agenda filter will be applied on each instance of rules that compose the task body. The instance for which the agenda filter returns true will be effectively fired; otherwise it is not.

See Also

agendafilter, ruletask