Facts inserted into WorkingMemory within rules are not automagically added to anywhere else.

To retrieve Facts created inside rules there are different options available; the simplest probably being to use a global that is a collection.

You can add new Facts to the global inside rules' RHS and also examine the content of the global in regular Java.

Have a read about using globals.



On 9 April 2013 19:45, dfsmith <dfsmith@llbean.com> wrote:
Thanks for the quick reply!

This is where I'm confused. My Then looks like this:

        SearchActions fact0 = new SearchActions();
        fact0.setUrlRedirect( "junk" );
        insert( fact0 );
        System.out.println("Created junk!!!");

There must be a SearchActions object created somewhere in memory as a result
of the rule. I was thinking it would be added to the list that was passed
into the knowledge session.

How / where do I check for and access the inserted object after the
execution of the rules?

Something simple I'm just not seeing in the examples I've googled.

Thanks,

David



--
View this message in context: http://drools.46999.n3.nabble.com/Rules-Firing-Java-Objects-Not-Manipulated-tp4023270p4023272.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users