[rules-dev] Is there any way to get the original eval expression through AfterActivationFiredEvent event?
2008-03-04 15:23:30 GMT
Hi,
I am using JBoss rules 3.0.6 to externalize all business rules. We have a requirement were in we want to create a audit report after rules have been executed. For each rule, we need to track Desired Condition Value(as specified in when part), Actual Condition Value(value in asserted object) and so on.
I looked into Event Model API's and was able to successfully fetch required data from call back methods provided by DefaultAgendaEventListener for most of the rules.
However, In my application there are some rules which use EvalCondition. I am not able to fetch required data from EvalExpression() - I know that using eval is not a good idea but it will remain like this for now.
On introspecting Eval Expression i am getting something like below:
TestIt.Rule_FirstRuleToTest_0Eval0Invoker <at> feefa5e0
What i am expecting is something like below:
eval( Income.getGrossIncome().doubleValue() == 10001)
Is there any way to get the original eval expression through AfterActivationFiredEvent event?
Another problem which i for see going forward is that i need to gather required audit data not only for rules which have fired but also for rules which did not get fired. I require same data for these rules like Desired Condition value, actual value in asserted object. So that any body can see how actual value differed from desired value. I am not able to figure out how to gather data for rules which did not get fired at all.
Regards,
Mohit Manrai
_______________________________________________ rules-dev mailing list rules-dev <at> lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev
Timescales are a little
bit longer, and what actually gets included will depend on feedback!
So , my next step is get get Part1 out there (and available in
Subversion) and that way you'll be able to add your good ideas to the
code
A Spring configurable Drools Solver perhaps?!
Thanks
Paul
Geoffrey De Smet wrote:
> Have you considered taking advantage of the BeanFactory interface (and
> probably ApplicationContextAware, InitializingBean and DisposableBean)?
> It's spring specific, but it will make life a lot easier on spring
> drools users.
>
> As I see it, a drools RuleBase ~ a hibernate EntityManagerFactory, and
> a drools WorkingMemory ~ a hibernate EntityManager.
> So the RuleBaseBean could implement DisposableBean (and other
> lifecycle interfaces as needed) so it knows when to destroy the
> rulebase (if that's needed)?
>
> Seam also does something similar, but only on the working memory:
>
RSS Feed