1 Reply Latest reply on Nov 10, 2008 2:33 PM by Eng Eng

    drools, globals and lhs method calls

    Eng Eng Newbie

      hi. i'm using drools for the first time and i'm running into a problem using a global in the lhs. here's the situation

      i have a service object set as a global
      i want to call a method on this object that returns a boolean
      i can use it in the rhs no problem but in the lhs i get compilation errors

      so for example, i can do this no problem:

      rule checkExistingSub
      when
      $s : SubscriberModel()
      $c : CollectiveModel()
      then
      collectiveService.isMember($s, $c);
      end

      however when i try this:
      rule checkExistingSub
      when
      $s : SubscriberModel()
      $c : CollectiveModel()
      collectiveService.isMember($s, $c);
      then
      end
      i get this:
      [23,29]: unknown:23:29 Unexpected token '$s'

      i've experimented a bit but just can't get it to work. so my questions are:

      is this possible?
      if so, what am i missing?