[rules-users] FactType returns null when creating a java client on Eclipse invoking a rule in Guvnor

Andre Fonseca andre.fonseca at mail.com
Mon Jan 9 05:31:16 EST 2012


hi Michael,

 My environment is like below

 droools expert 5.3.0 final
 guvnor 5.3.0 final - guvnor-5.3.0.Final-tomcat-6.0.war
 Eclipse Helios - JBoss Drools Workbench 4.0.7 plugin

 I am not using authentication in guvnor, using guest user

 Actually I think I resolved the issue!

 I think I was missing to build the package! Now it works, below the test code I used

 Java Class 

 Resource xml = ResourceFactory.newClassPathResource("changeset.xml");
 KnowledgeAgent kAgent = KnowledgeAgentFactory.newKnowledgeAgent("myagent");
 kAgent.applyChangeSet(xml);
 KnowledgeBase kBase = kAgent.getKnowledgeBase();
 FactType fType = kBase.getFactType("mypackage", "MyObject");

 <change-set xmlns='http://drools.org/drools-5.0/change-set'
 xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
 xs:schemaLocation='http://drools.org/drools-5.0/change-set http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd' >
 <add>
 <resource source='http://localhost:8090/drools-guvnor/org.drools.guvnor.Guvnor/package/mypackage/LATEST' type='PKG' />
 </add>
 </change-set>
 Thanks for all!
----- Original Message -----
From: Michael Anstis
Sent: 01/09/12 06:13 AM
To: Rules Users List
Subject: Re: [rules-users] FactType returns null when creating a java client on Eclipse invoking a rule in Guvnor

 What version of Drools Expert and Guvnor are you using?

 On 9 January 2012 00:47, kachaps4u < kachanAnidharan at gmail.com > wrote:
 Exactly my error too!!! I too followed their documentation.. some one had to
 find it. My project has ESB in it too.. So I went to the next step in
 running the uri from an ESB and it was successful. But the thing is I
 uploaded the POJO jars and wrote rules. I didn't test creating FACT in BRMS
 and running the same because I couldn't solve this error. let me see whether
 i can do something. I will update if i get any positive result.

 --
 View this message in context: http://drools.46999.n3.nabble.com/rules-users-FactType-returns-null-when-creating-a-java-client-on-Eclipse-invoking-a-rule-in-Guvnor-tp3642559p3643345.html 

 Sent from the Drools: User forum mailing list archive at Nabble.com.
 _______________________________________________
 rules-users mailing list
 rules-users at lists.jboss.org 
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120109/2372fa10/attachment.html 


More information about the rules-users mailing list