[rules-users] Any API accessing to the rule logic instead of only Facts

Stephen Masters stephen.masters at me.com
Mon Jul 29 14:21:35 EDT 2013


Do your other applications log the source code of the application every time a call is made to it?

It may be better to look at what Guvnor has to offer. For instance, it provides version history of the rules, so that if you know the name of a rule (which you get from the activation details), then for audit purposes you should be able to see what that rule looked like on a particular time and date.

Steve


On 29 Jul 2013, at 19:01, Wolfgang Laun <wolfgang.laun at gmail.com> wrote:

> There is no *stable* API to obtain details about the LHS from the rule
> in a knowledge base. Validator does access LHS patterns and
> constraints for analysis, but this is rather tricky unless your rules
> are very simple.
> 
> You can obtain the rule name from the activation. It's probably easier
> to associate rule names with rule texts, even though such a lookup
> isn't in the API.
> 
> -W
> 
> On 29/07/2013, Sean Su <sean.x.su at gmail.com> wrote:
>> Does anyone know a public Drools API that we can use to access to the
>> actual rule logic in a structured way? Current we can use
>> AgendaEventListener and WorkingMemoryEventListener to access the facts
>> using in LHS and the objects used in RHS. But my project has some special
>> requirements which need to access the actual rule logic on LHS for auditing
>> and justification purpose.
>> 
>> For example, if a rule is like this:
>> 
>> when fact.list contains "123"
>> then do something.
>> 
>> When this rule is fired, not only do I need to know what the fact object
>> is, I also need to know the condition of this rule is involved a "contains"
>> API, with value "123".
>> 
>> Thanks in advance.
>> 
>> Sean
>> 
> _______________________________________________
> 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