[rules-users] Creating custom selectors using the "category" property for deploying certain rules in guvnor

Premkumar Stephen prem18 at gmail.com
Mon Jul 6 07:54:13 EDT 2009


Hi Jaroslaw,


I voted for https://jira.jboss.org/jira/browse/GUVNOR-109
and added the following comment:
<<
+1 for this request.
The ability for users to choose among which selectors are available is
awesome.

Here's an extra requirement that I am bringing forward, not sure what the
complexity on this is:
The list will be populated based on user permissions of some kind.
ie, not all the users can deploy production rules, but all can deploy QA
rules, for example.
>>

I have also created https://jira.jboss.org/jira/browse/GUVNOR-392 for
including categories as a field for filtering.

Regarding your tip on using the 'status' field, I was planning for the
workaround, though it messes with the actual value of this field which i was
planning to use.
Based on our environment, we might actually use the "author" field as
currently there will not be many authors and we are tracking functionality
by using categories anyways.

I have the following questions that are still unanswered:
1) I am trying to figure out where the code for "statusDescription" is?
2) You have suggested 'categorySummary'  - was wondering where these fields
are configured.
3) the minimal documentation in selectors.properties tells only about the
fields status, lastModified date and author, and ends with etc. Could one of
the devs kindly post ALL the fields that could be used?

Regards,
Prem


On Wed, Jul 1, 2009 at 1:03 PM, Jaroslaw Kijanowski <kijanowski at gmail.com>wrote:

> Hi,
>  you may vote for this one ;)
> https://jira.jboss.org/jira/browse/GUVNOR-109
>
> So far I have successfully used 'stateDescription' and 'creator', for
> sample rules look at this:
> https://jira.jboss.org/jira/browse/GUVNOR-108
>
> Haven't tried to select by category - how about 'categorySummary'?
>
> Cheers,
>  Jarek
>
> Premkumar Stephen wrote:
>
>> Hello everyone,
>>
>> I am trying to create a custom selector, based on certain properties such
>> as "categories" (primary property) and others such as status and author.
>>
>> from the examples in selectors.properties, I could not see a way to create
>> using categories. In that file, some of the field described are
>> statusDescription, lastModified, creator, etc
>> I was trying to find the complete list of all fields that could be used to
>> filter the rules.
>>
>> I dug into the code and came across "categoryReference" in
>> VersionableItem.java. Is this the variable that stores the category?
>> Since a rule can have multiple categories, how does this pan out? Is this
>> a Collection?
>>
>> Also, where does the string "statusDescription" get tied in to the status
>> of a rule? This one throws me off, since it is a valid field, but I cannot
>> understand how it is being set.
>>
>> If any of you could share examples where you have done custom selectors
>> either in java or in drl, that would be awesome.
>>
>> Thanks,
>> Prem
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090706/ef997a37/attachment.html 


More information about the rules-users mailing list