Mohit Manrai | 4 Mar 16:23
Picon
Gravatar

[rules-dev] Is there any way to get the original eval expression through AfterActivationFiredEvent event?

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
Paul Browne | 5 Mar 18:12
Favicon
Gravatar

[rules-dev] Drools - Spring (IOC) - In progress

Folks,

Quick update on how the Spring (IOC) - Drools integration is going

- About 2/3rds of what I'm doing is Examples and Documentation , the other third is the Spring (IOC)-Drools adapter themselves.
- Calling it IOC rather than Spring as the adapter classes are just JavaBeans - in theory they should work with Guice and Seam as well.
- Only a couple of adapter classes are needed; most functionality is already in the existing Spring or Drools Frameworks.
- Example is based on HelloWorld - preview is up on the wiki - http://www.firstpartners.net/kb/index.php/Spring_JBoss_Rules_%28Drools%29_Integration
- I'll need to provide Spring config / code snippets for Stateless Sessions,  RuleAgents and deploying as part of Web apps as well
- Will refer to Transactions, Spring Proxy etc ; in general this part will be RTSM (read the spring manual).

Anybody has any thoughts?

Paul

www.firstpartners.net/blog

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Geoffrey De Smet | 6 Mar 08:16
Picon
Gravatar

Re: [rules-dev] Drools - Spring (IOC) - In progress

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:
http://docs.jboss.com/seam/2.0.1.GA/api/org/jboss/seam/drools/ManagedWorkingMemory.html
Notice the destroy() method.

With kind regards,
Geoffrey De Smet

Paul Browne schreef:
> Folks,
> 
> Quick update on how the Spring (IOC) - Drools integration is going
> 
> - About 2/3rds of what I'm doing is Examples and Documentation , the 
> other third is the Spring (IOC)-Drools adapter themselves.
> - Calling it IOC rather than Spring as the adapter classes are just 
> JavaBeans - in theory they should work with Guice and Seam as well.
> - Only a couple of adapter classes are needed; most functionality is 
> already in the existing Spring or Drools Frameworks.
> - Example is based on HelloWorld - preview is up on the wiki - 
> *http://www.firstpartners.net/kb/index.php/Spring_JBoss_Rules_%28Drools%29_Integration
> *- I'll need to provide Spring config / code snippets for Stateless 
> Sessions,  RuleAgents and deploying as part of Web apps as well
> - Will refer to Transactions, Spring Proxy etc ; in general this part 
> will be RTSM (read the spring manual).
> 
> Anybody has any thoughts?
> 
> Paul
> 
> www.firstpartners.net/blog
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> rules-dev mailing list
> rules-dev <at> lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Paul Browne | 6 Mar 09:18
Favicon
Gravatar

Re: [rules-dev] Drools - Spring (IOC) - In progress

Geoffrey,

The answer is 'Yes I want to include the Spring interfaces' and I'm 
going to do it in two parts

Part 1) Is the basic JavaBeans (none of Spring Specific interfaces that 
you mention - yet) that will work for Guice, Seam etc. Very simple stuff 
, mostly it's examples and Docs on how to do *basic* Spring Drools 
integration. This covers (in my opinion) what 60% of people need. This 
part I want to get done ASAP and it gives us a start in the Drools-IOC area.

Part 2) is all the other Spring specific interfaces (such as 
ApplicationContextAware, if the Drools Bean needs to know about 
configuration changes). I have a note in my Part1 docs to show how to 
extend  if you need that stuff *now* . It's not rocket science , but 
people like to see it in black and white :-)  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:
> http://docs.jboss.com/seam/2.0.1.GA/api/org/jboss/seam/drools/ManagedWorkingMemory.html 
>
> Notice the destroy() method.
>
> With kind regards,
> Geoffrey De Smet
>
> Paul Browne schreef:
>> Folks,
>>
>> Quick update on how the Spring (IOC) - Drools integration is going
>>
>> - About 2/3rds of what I'm doing is Examples and Documentation , the 
>> other third is the Spring (IOC)-Drools adapter themselves.
>> - Calling it IOC rather than Spring as the adapter classes are just 
>> JavaBeans - in theory they should work with Guice and Seam as well.
>> - Only a couple of adapter classes are needed; most functionality is 
>> already in the existing Spring or Drools Frameworks.
>> - Example is based on HelloWorld - preview is up on the wiki - 
>> *http://www.firstpartners.net/kb/index.php/Spring_JBoss_Rules_%28Drools%29_Integration 
>>
>> *- I'll need to provide Spring config / code snippets for Stateless 
>> Sessions,  RuleAgents and deploying as part of Web apps as well
>> - Will refer to Transactions, Spring Proxy etc ; in general this part 
>> will be RTSM (read the spring manual).
>>
>> Anybody has any thoughts?
>>
>> Paul
>>
>> www.firstpartners.net/blog
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev <at> lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>
> _______________________________________________
> rules-dev mailing list
> rules-dev <at> lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

siddhartha banik | 10 Mar 17:34
Picon

[rules-dev] Drools 4.0.x branch has still some issues with serialization

 
Hi Group Members,
 
I have checked out Drools source from  http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/  on 7th March,2008.
 
After that I have tested some scenarios/use cases, which are required for our use.
 
1. 'Add Pkg/Rule with serialized RuleBase & Working Memory' use case is working fine, except some special scenarios
                                                                              [ I have mentioned them in the attached file DynamicRulesMoreTest)].
 
2. 'Remove Pkg/rule with serialized RuleBase & Working Memory' use case is not working.
 
I have attached the Test scenarios & Rule(s) . 
 
Please help me, if I am doing some thing wrong. Above 2 use cases are very important for us, to use "Drool" in our application.
 
 
Regards
Siddhartha
Attachment (DynamicRulesMoreTest.zip): application/zip, 3543 bytes
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 10 Mar 18:02

Re: [rules-dev] Drools 4.0.x branch has still some issues with serialization

We will look into these before doing the 4.0.5 release.

Mark
siddhartha banik wrote:
 
Hi Group Members,
 
I have checked out Drools source from  http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/  on 7th March,2008.
 
After that I have tested some scenarios/use cases, which are required for our use.
 
1. 'Add Pkg/Rule with serialized RuleBase & Working Memory' use case is working fine, except some special scenarios
                                                                              [ I have mentioned them in the attached file DynamicRulesMoreTest)].
 
2. 'Remove Pkg/rule with serialized RuleBase & Working Memory' use case is not working.
 
I have attached the Test scenarios & Rule(s) . 
 
Please help me, if I am doing some thing wrong. Above 2 use cases are very important for us, to use "Drool" in our application.
 
 
Regards
Siddhartha
_______________________________________________ rules-dev mailing list rules-dev <at> lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 13 Mar 03:17

[rules-dev] Do you have a Bug?

We've fixed a huge number of things for 4.0.5. We are going to try and get the release out this friday. So please hurry if you have a bug then let us know, especially if you have a fix :) And don't forget to try your bug out on 4.0.x in svn in case its already fixed:

http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/

Mark

Mark Proctor wrote:
Narendra Valada wrote:
I had reported an issue a couple of weeks ago with nested inner classes not being handled correctly.
 
I made some changes to the org.drools.base.ClassTypeResolver class to resolve it and everything appears to work fine.
 
How do I provide the fix and test case to you? Do you want me to raise a JIRA?
Yes you will need to raise a JIRA. At this stage we have no plans to fix this, as we can consider inner inner classes esoteric enough to say it's unsupported. Although if someone can provide a clean patch, it would be nice to fix. You'll have to be quick though, if you want the fix in 4.0.5
 
Thanks,
 
Narendra

 
On 3/8/08, Mark Proctor <mproctor <at> codehaus.org> wrote:
We are about to release 4.0.5, next week. This has a large number of bug
fixes, especially multi-threading bugs. Anyone that has production
issues can you please do a checkout for the 4.0.x branch asap and
provide us with a test case if it is not fixed. If you don't get your
test case to us by end of monday, start of tuesday, you'll have to wait
another 2 months+ for 4.0.6.
http://anonsvn.labs.jboss.com/labs/jbossrules/branches/4.0.x/

Mark
_______________________________________________
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

_______________________________________________ rules-users mailing list rules-users <at> lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 13 Mar 14:29

[rules-dev] Drools and Google Summer Of Code

http://blog.athico.com/2008/03/drools-and-google-summer-of-code.html

The Google Summer of Code is beginning. Drools, being a Red Hat project, has to participate under the Fedora banner. So I've put a few project ideas up on the JBoss GSoC page. If you're able to enter as a student please do take a look and don't hesitate to contact if anything interests you.

I've also listed the ideas below, please leave comments if you have any other ideas you think might make good student projects. Or maybe you are a student and you want to propose a GSoC project.

  • Subversion/CVS and JCR synchronisation. This allows our web based BRMS, called Guvnor, to synchronise it's content with what's used in an IDE, such as Eclipse
  • Eclipse file upload tool with meta-data properties editing. You should be able to right click a file or a folder and upload to the web based Guvnor. Previously uploaded files(assets) should be recognised and uploaded as a modify.
  • SBVR, structured natural language, implementation for Drools. Can do either or both the frontend or the backend.
  • Eclipse tooling enhancements including any of the following: search, refactoring, reformatting.
  • Animate the Rete view to represent network propagation.
  • Improve the DSL capabilities of Drools, supporting more complex grammars.
  • Improve the Guvnor, web based BRMS, to handle the management of more asset types. Including images, video, sound etc. Guvnor involves JCR, Seam and GWT work.
  • Create a Web based process designer for Drools ruleflow using GWT Designer.

  • Mark

    _______________________________________________
    rules-dev mailing list
    rules-dev <at> lists.jboss.org
    https://lists.jboss.org/mailman/listinfo/rules-dev
    
    siddhartha banik | 14 Mar 07:31
    Picon

    [rules-dev] Re : Drools 4.0.x branch has still some issues with serialization

     
    Hi Drools Team,
     
    I have checked out Drools 4.0.x branch & found that all my test scenarios with "Dynamic Rules" are now working fine :-).
     
    Thanks a lot for fixing the issues so promptly. I appreciate it !!!
     
    Now, we will definitely use Drools in our application.
     
    I have a Good To have feature request for Drools:   "Include check for duplicate objects being asserted into Working Memory & don't generate any activation for such objects or silently don't assert them at all in WM."  I tested this scenario with JESS, they are already doing that. This will save Drools user from doing duplicate check, which is bit costly now.
    Or can you please suggest me any simple way, by which still I can achieve this in Drools ?
     
    Thanks & Happy Drooling
    Siddhartha
     
    _______________________________________________
    rules-dev mailing list
    rules-dev <at> lists.jboss.org
    https://lists.jboss.org/mailman/listinfo/rules-dev
    
    Edson Tirelli | 14 Mar 11:53

    Re: [rules-dev] Re : Drools 4.0.x branch has still some issues with serialization


        Good to know. Thanks for the feedback.

        Drools has 2 configurations for what you want:

    1. If you want to completely deny the "existence" of 2 or more equals() objects in the working memory, change the assert behavior to EQUALITY based. The default behavior is IDENTITY based:

    drools.assertBehaviour = <identity|equality>
    or
    RuleBaseConfiguration.setAssertBehavior()

    2. If you want to allow existence of equals() objects in the working memory, but want each fact matching at most one pattern in your rule, set removeIdentities to true:

    drools.removeIdentities = <true|false>
    or
    RuleBaseConfiguration.setRemoveIdentities()


        []s
        Edson

    2008/3/14, siddhartha banik <siddhartha.banik <at> gmail.com>:
     
    Hi Drools Team,
     
    I have checked out Drools 4.0.x branch & found that all my test scenarios with "Dynamic Rules" are now working fine :-).
     
    Thanks a lot for fixing the issues so promptly. I appreciate it !!!
     
    Now, we will definitely use Drools in our application.
     
    I have a Good To have feature request for Drools:   "Include check for duplicate objects being asserted into Working Memory & don't generate any activation for such objects or silently don't assert them at all in WM."  I tested this scenario with JESS, they are already doing that. This will save Drools user from doing duplicate check, which is bit costly now.
    Or can you please suggest me any simple way, by which still I can achieve this in Drools ?
     
    Thanks & Happy Drooling
    Siddhartha
     

    _______________________________________________
    rules-dev mailing list
    rules-dev <at> lists.jboss.org
    https://lists.jboss.org/mailman/listinfo/rules-dev




    --
      Edson Tirelli
      JBoss Drools Core Development
      Office: +55 11 3529-6000
      Mobile: +55 11 9287-5646
      JBoss, a division of Red Hat <at> www.jboss.com
    _______________________________________________
    rules-dev mailing list
    rules-dev <at> lists.jboss.org
    https://lists.jboss.org/mailman/listinfo/rules-dev
    

    Gmane