Hi 

I am using Guvnor for editing my business rules. I am able to write a test
program in java that would fire one sample rule that I have created in
guvnor. 

public static final void main(String[] args) {
        try {

                // load up the knowledge base
                //KnowledgeBase kbase = readKnowledgeBase();
                KnowledgeAgent kagent = 
KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent"
);
                        kagent.applyChangeSet(
                ResourceFactory.newFileResource("C:/Test/changeset.xml"));
                KnowledgeBase kbase1 = kagent.getKnowledgeBase(); 
                StatefulKnowledgeSession ksession = 
                               kbase1.newStatefulKnowledgeSession();
                Message message = new Message();
                message.setMessage("Hello World");
                message.setStatus(Message.HELLO);
                ksession.insert(message);
                ksession.fireAllRules();
                ksession.dispose();
        }
        catch (Exception ex) {
                        ex.printStackTrace();
        }
}

Now I am trying to see if I would be able to detect changes in the rules
that I edit in Guvnor at runtime. What I am trying to do is to edit one of
the rules and save it, and I need this change to be picked up automatically
by my java application.

Is this possible? How do I do this? 

Thanks 
Ram
-- 
View this message in context: 
http://www.nabble.com/Detect-changes-in-rules-at-runtime-tp24379025p24379025.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to