JBoss Rules is good for reasoning over flat structures, its hard to do anything with DOMS or other nested structures. Unless you break them apart.

Mark
gomez wrote:
Ok,but how do I define the rules?
I mean, a dom document doesn't have fields,right?
So,if I want to define a rule like:
rule "Hello World"
        when
                m : Message( status == Message.HELLO, message : message )
        then
System.out.println( message ); m.setMessage( "Goodbye cruel world" );
                m.setStatus( Message.GOODBYE );
                modify( m );
end

Where instead of having a class Message with fields named "status" and
"message" I have a dom document with those informations somewhere in it,how
do I do?
I'm doing it defining a new class Message and building object of this class
with values obtained from the XML with xerces.Then I define rules on those
objects,and,finally,go all the way back to the XML file.
Is this way stupid?Is there a smarter one?


you can pass in a Dom object as a fact.




---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to