Hi,
the file should be called
selectors.properties and not
selector.properties - I've just fixed that in the tutorial.
Thanks,
Jarek
John Peterson wrote:
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_
<
http://www.kijanowski.eu/index.php?site=articles&article=guvnor_selec...
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.
------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users