[rules-users] trying to retrieve facts from WorkingMemory

Kevin Alonso kalonso at vicomtech.org
Thu May 7 07:23:16 EDT 2009


I´m trying to retrieve the information of the Working memory inside an 
action element of the ruleflow.

I have already writed a query in to .drl file

query "Random Word"
    rw : RandomWord()
end

And part of the code in the action element is the next:

QueryResults results = workingMemory.getQueryResults("Random Word" );
System.out.println( "we have " + results.size() + " random words" );

I have obtained this code  from documentation, but I don´t know how to 
get the workingMemory object.

Regards,

Kevin



More information about the rules-users mailing list