[rules-users] rules-users Digest, Vol 42, Issue 139
Jaroslaw Kijanowski
kijanowski at gmail.com
Fri Jun 4 16:32:14 EDT 2010
My best guess is that it must be something very trivial, like a typo in
a file name or the selector name in the properties file or GUI... have
you tried the latest and greatest 5.1 M2 release? There is built-in
support for selectors based on category and status.
Moreover once you provid your own selector in the selectors.properties
file it shows up as a custom selector in a drop down box.
Cheers,
Jarek
John Peterson wrote:
> Checked my file and it was named selectors.properties (with the 's').
> Apparently, I made a typo while typing in my issue. The file was there
> from my installation (I didn't create it myself). I'm still having the
> error, though.
>
> ------------------------------
>
> 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_selecto
> rs&lang=en_
> <http://www.kijanowski.eu/index.php?site=articles&article=guvnor_selecto
> rs&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-IN
> F\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 at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> End of rules-users Digest, Vol 42, Issue 139
> ********************************************
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
More information about the rules-users
mailing list