title: Drools: How to use an enum in the lhs of a rule?
body: <p>I am having difficulties in writing a rule which match with an enum value in its lhs.</p>
  
  <p>For example, if I have the following enum:</p>
  
  <pre><code>public enum EStatus {
    OK,
    NOT_OK
  }
  </code></pre>
  
  <p>I would like to use it in something like this:</p>
  
  <pre><code>rule "my rule"
  dialect "java"
      when        
          status : EStatus()                      // --&gt; this works, but I want to be more specific
          // status : EStatus(this == EStatus.OK) // --&gt; doesn't work. How can I make it work?
      then
          // ...
  end
  </code></pre>
  
  <p>Is this even possible in Drools? I use version 5.1.1.</p>