I'm wondering where did you get the content of that Guvnor.properties file.
The problem you are having is that the property file is not used to tell
the agent which resources should it use, but to set some of its internal
configurations such as:
- drools.agent.monitorChangeSetEvents (boolean)
- drools.agent.scanDirectories (boolean)
- drools.agent.scanResources (boolean)
- drools.agent.newInstance (boolean)
- drools.agent.useKBaseClassLoaderForCompiling (boolean)
- drools.agent.validationTimeout (long)
So, the properties you have there are not even being user, nor understood,
by drools.
In order to tell the agent which resources should it use, you must provide
a change-set pointing to those resources. You can find more information
about change-sets in Drools documentation.
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Blog @
On Wed, Dec 5, 2012 at 8:52 AM, Hushen Savani
<hushen.savani(a)elitecore.com>wrote:
It seems that problem is with rule consumer (client), because even
when
I mess up with url of guvnor, it is giving me the same behavior:****
** **
*Guvnor.properties*:****
** **
url=http://localhost:10080/ *guvnor*-5.5.0.Final-*tomcat*
-6.0/org.drools.guvnor.Guvnor/package/new *Pkg*/car111_*messed_up_url*****
enableBasicAuthentication=true****
username=*admin*****
password=*admin*****
name=*drooltest*
* *
** **
*Drool Consumer*:****
** **
*package* kijanowski.eu;****
** **
*import* java.util.Collection;****
*import* java.util.Iterator;****
** **
*import* org.drools.KnowledgeBase;****
*import* org.drools.agent.KnowledgeAgent;****
*import* org.drools.agent.KnowledgeAgentFactory;****
*import* org.drools.runtime.StatefulKnowledgeSession;****
** **
*public* *class* GuvnorTest {****
** **
*public* *static* *final* *void* main(String[] args) {****
** **
KnowledgeAgent agent = KnowledgeAgentFactory.*
newKnowledgeAgent*("/Guvnor.properties"); ****
KnowledgeBase ruleBase = agent.getKnowledgeBase();****
** **
StatefulKnowledgeSession workingMemory =
ruleBase.newStatefulKnowledgeSession();****
****
Driver d = *new* Driver("Jarek", 20, *null*);****
workingMemory.insert(d);****
** **
workingMemory.fireAllRules();****
****
*Collection* c = workingMemory.getObjects();****
****
*for*(*Iterator* i = c.iterator(); i.hasNext();) {****
//System.out.println(i.next().getClass().getCanonicalName());****
Driver e = (Driver)i.next();****
System.*out*.println(" Age: " + e.getAge() + " Name:
"+ e.getName() + "
Car: " + e.getCar() + " Object: " + e);****
}****
}****
}****
** **
Can anyone please suggest some pointers on the same.****
** **
Thanks.****
** **
Best Regards****
*Hushen Savani*****
** **
*From:* rules-users-bounces(a)lists.jboss.org [mailto:
rules-users-bounces(a)lists.jboss.org] *On Behalf Of *Esteban Aliverti
*Sent:* Tuesday, December 04, 2012 9:38 PM
*To:* Rules Users List
*Subject:* Re: [rules-users] Value is not reflected in Fact Object at
Drool Client Side****
** **
Sorry, I've just re-read your post and saw that you already mentioned that
you are not seeing the system.out of your rule.****
What you can do is to debug (or add some code) to see which rules do you
have in the kbase returned by the kagent.****
My guess is that your are not getting what you are expecting from Guvnor.*
***
** **
Best Regards, ****
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Blog @
http://ilesteban.wordpress.com
****
On Tue, Dec 4, 2012 at 5:03 PM, Esteban Aliverti <
esteban.aliverti(a)gmail.com> wrote:****
Do you see the message you are printing in the RHS of your rule?****
** **
Best Regards,****
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Blog @
http://ilesteban.wordpress.com****
****
On Tue, Dec 4, 2012 at 3:28 PM, Mister Nono <noel.maurice(a)univ-jfc.fr>
wrote:****
Hi,
Have you try to add in the then of the drools rule the line : *update(a);*
Best regards. ;)
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-Value-is-not-reflected-in-F...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users****
** **
** **
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users