[rules-users] Working on Selectors - getting 'The Selector named onlyNonDraftRules is not available'

John Peterson john.peterson.gv3k at statefarm.com
Wed May 26 11:43:12 EDT 2010


I'm working off of Jarosław Kijanowski's blog post from 7/8/2009 on using Selectors:

http://www.kijanowski.eu/index.php?site=articles&article=guvnor_selectors&lang=en

I've followed the instructions for a DRL selector, including adding a line to the selector.properties file as follows:

onlyNonDraftRules=/NonDraft.drl

Both the NonDraft.drl file and selector.properties file are here:

<parent directory>\jboss-4.2.3.GA\server\default\deploy\drools-guvnor.war\WEB-INF\classes

My NonDraft.drl is as follows:

package org.drools.guvnor.server.selector

import org.drools.repository.AssetItem
import org.drools.guvnor.server.selector.Allow

rule 'non draft rules'
dialect 'mvel'
when 
  AssetItem(stateDescription != "Draft")
then
  insert(new Allow());
end

When I try to do a "Build Package" in Guvnor, I get the following error: "Name: com.sample, Format: package, Message: The Selector named onlyNonDraftRules is not available"

My package in Guvnor has a few rules, only one of which is not in Draft status.  Everything is built in Guvnor (including Facts - no code is written in Eclipse).

Has anyone seen this error before and know how to correct it?  I'm using 5.0.1.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100526/9faacd47/attachment.html 


More information about the rules-users mailing list