Hi, On Wed, Jun 18, 2008 at 1:17 PM, Alexander Claus <[EMAIL PROTECTED]> wrote: >> I want to use rules which shall generate as a consequence a new java >> object. >> The GUI of my application shall display the new generated objekt. >> but how can the GUI of my application get informed by the rule engine that >> it has generated a new object (Warning)? And how the GUI or any other java >> component can access this new generated object from outside? > > Have a look at org.drools.event.WorkingMemoryEventListener. > I think you find yourself how to use it. > > Best regards. > Alexander Claus
another approach would be to register some service as a global to your working memory. Then, when creating the object in the RHS of your rule, you call some method on it like this rule "Value below threshold" when FactX ( property < threshold) then Warning warning = new Warning( "Under threshold" ); service.addWarning(warning); insert(warning); end Best regards Marcus _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users