[rules-users] How to access data after rule fires

Edson Tirelli tirelli at post.com
Mon Jan 12 17:15:49 EST 2009


   Can't you keep the reference to your object while firing the rules?

MyObject x = ...
ksession.insert( x );
ksession.fireAllRules();
boolean result = x.getBooleanAttribute();

    []s
    Edson

2009/1/12 Costello, Robert <rcost10 at searshc.com>

> So, how do I access data after the rules fire?
>
> If one has a rule which modifies a field on an object (a boolean, for
> example), and you want to return the object after the rules are
> complete, how do you do it?
>
> I tried this using a StatefulKnowledgeSession, getting an object
> collection after the rules fire, but I don't see that this works.
>
> Also googled the heck out of this and looked in all the documentation.
> I must be missing something, because the docs generally are pretty good.
>
>
> Any hints?
>
> Thanks in advance,
>
> Robert Costello
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090112/25efeae1/attachment.html 


More information about the rules-users mailing list