Thanks a lot, that was it!!!!<br><br>Seb<br><br><div class="gmail_quote">On Tue, Mar 15, 2011 at 10:08 PM, Ross H <span dir="ltr">&lt;<a href="mailto:ross.hall@suncorp.com.au">ross.hall@suncorp.com.au</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Try using a changeset with file:path-to-your-changeset.xml rather than<br>
classpath:changeset.xml<br>
<div><div></div><div class="h5"><br>
<br>
SebRR wrote:<br>
&gt;<br>
&gt; Yes I am using 5.1.1 and if I go to the latest xsd<br>
&gt; (drools-spring-1.2.0.xsd), there is no attribute called &#39;knowledgeAgent&#39; .<br>
&gt;<br>
&gt; On Tue, Mar 15, 2011 at 2:09 PM, Esteban Aliverti &lt;<br>
&gt; <a href="mailto:esteban.aliverti@gmail.com">esteban.aliverti@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; I think 5.1.1 should be fine. Which version are you using?<br>
&gt;&gt;<br>
&gt;&gt; Best,<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
&gt;&gt;<br>
&gt;&gt; Esteban Aliverti<br>
&gt;&gt; - Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a><br>
&gt;&gt; - Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Mar 15, 2011 at 9:24 AM, Sébastien Raickman &lt;<br>
&gt;&gt; <a href="mailto:sebastien.raickman@gmail.com">sebastien.raickman@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Hi Esteban,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; yes my change set is linked to this resource:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; *resource source=&quot;<br>
&gt;&gt;&gt; <a href="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.mypackage/MySnapshot" target="_blank">http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.mypackage/MySnapshot</a><br>

&gt;&gt;&gt; *<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I have tried out the 2nd solution but JBoss says --&gt; kAttribute<br>
&gt;&gt;&gt; &#39;knowledgeAgent&#39; is not allowed to appear in element &#39;drools:ksession&#39;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Which version of Drools should I use for this?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Thanks<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Tue, Mar 15, 2011 at 12:59 PM, Esteban Aliverti &lt;<br>
&gt;&gt;&gt; <a href="mailto:esteban.aliverti@gmail.com">esteban.aliverti@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I suspect that the ksession defined in spring is created BEFORE the<br>
&gt;&gt;&gt;&gt; agent<br>
&gt;&gt;&gt;&gt; processes the resource. And even after the agent processes the<br>
&gt;&gt;&gt;&gt; resource, it<br>
&gt;&gt;&gt;&gt; will create a new kbase (because you are not using<br>
&gt;&gt;&gt;&gt; newInstance=&quot;false&quot;), so<br>
&gt;&gt;&gt;&gt; the defined ksession will remain attached to an empty kbase.<br>
&gt;&gt;&gt;&gt; I can think in 2 solutions:<br>
&gt;&gt;&gt;&gt;    1.- Remove the ksession definition from the spring context file and<br>
&gt;&gt;&gt;&gt; create a new ksession using the kagent:<br>
&gt;&gt;&gt;&gt; kagent.newStatelessKnowledgeSession();<br>
&gt;&gt;&gt;&gt;    2.- Configure ksession&#39;s kagent from spring (this only works for<br>
</div></div>&gt;&gt;&gt;&gt; stateless ksessions): &gt;&gt; knowledgeAgent=&quot;kagent1&quot;&gt;<br>
<div class="im">&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; By the way, the subject of this email says you re linking drools-server<br>
&gt;&gt;&gt;&gt; to Guvnor, but your changeset is not using any Guvnor&#39;s URL. Are you<br>
&gt;&gt;&gt;&gt; manually downloading the changeset.xml and putting it in your<br>
&gt;&gt;&gt;&gt; classpath?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Best Regards,<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Esteban Aliverti<br>
&gt;&gt;&gt;&gt; - Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a><br>
&gt;&gt;&gt;&gt; - Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
</div>&gt;&gt;&gt;&gt; 2011/3/15 Sébastien Raickman &amp;<a href="mailto:lt%3Bsebastien.raickman@gmail.com">lt;sebastien.raickman@gmail.com</a>&amp;gt;<br>
<div class="im">&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Hi all,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I would like to connect to drools-server with HTTPClient with the<br>
&gt;&gt;&gt;&gt;&gt; following<br>
&gt;&gt;&gt;&gt;&gt; config:<br>
&gt;&gt;&gt;&gt;&gt;<br>
</div><div class="im">&gt;&gt;&gt;&gt;&gt; &gt;&gt;&gt;       xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;       xmlns:drools=&quot;<a href="http://drools.org/schema/drools-spring" target="_blank">http://drools.org/schema/drools-spring</a>&quot;<br>
&gt;&gt;&gt;&gt;&gt;       xsi:schemaLocation=&quot;<a href="http://www.springframework.org/schema/beans" target="_blank">http://www.springframework.org/schema/beans</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; <a href="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" target="_blank">http://www.springframework.org/schema/beans/spring-beans-2.0.xsd</a><br>
&gt;&gt;&gt;&gt;&gt;                           <a href="http://drools.org/schema/drools-spring" target="_blank">http://drools.org/schema/drools-spring</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
</div>&gt;&gt;&gt;&gt;&gt; <a href="http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd" target="_blank">http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-container/drools-spring/src/main/resources/org/drools/container/spring/drools-spring-1.0.0.xsd</a>&quot;&gt;&amp;nbsp;<br>

<div class="im">&gt;&gt;&gt;&gt;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
&gt;&gt;&gt;&gt;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
&gt;&gt;&gt;&gt;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
&gt;&gt;&gt;&gt;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
&gt;&gt;&gt;&gt;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
&gt;&gt;&gt;&gt;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
</div><div><div></div><div class="h5">&gt;&gt;&gt;&gt;&gt; where my changeset.xml is adding a snapshot deployed with Guvnor.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; But I am not able to trig the rule with the following client:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; BatchExecutionCommandImpl command = new BatchExecutionCommandImpl();<br>
&gt;&gt;&gt;&gt;&gt; command.setLookup(&quot;ksession1&quot;);<br>
&gt;&gt;&gt;&gt;&gt; InsertObjectCommand insertObjectCommand = new<br>
&gt;&gt;&gt;&gt;&gt; InsertObjectCommand(&quot;TEST&quot;);<br>
&gt;&gt;&gt;&gt;&gt; FireAllRulesCommand fireAllRulesCommand = new FireAllRulesCommand();<br>
&gt;&gt;&gt;&gt;&gt; command.getCommands().add(insertObjectCommand);<br>
&gt;&gt;&gt;&gt;&gt; command.getCommands().add(fireAllRulesCommand);<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; String xml =<br>
&gt;&gt;&gt;&gt;&gt; BatchExecutionHelper.newXStreamMarshaller().toXML(command);<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; HttpClient httpClient = new HttpClient();<br>
&gt;&gt;&gt;&gt;&gt; httpClient.getHostConfiguration().setHost(&quot;host&quot;, 8080);<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; PostMethod postMethod = new<br>
&gt;&gt;&gt;&gt;&gt; PostMethod(&quot;/drools-5.1.1-server/kservice/rest/execute&quot;);<br>
&gt;&gt;&gt;&gt;&gt; postMethod.setRequestEntity(new StringRequestEntity(xml, null, null));<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; try {<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;        httpClient.executeMethod(postMethod);<br>
&gt;&gt;&gt;&gt;&gt;        int code = postMethod.getStatusCode();<br>
&gt;&gt;&gt;&gt;&gt;        System.out.println(code);<br>
&gt;&gt;&gt;&gt;&gt;        String rep = postMethod.getResponseBodyAsString();<br>
&gt;&gt;&gt;&gt;&gt;        System.out.println(rep);<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; } catch(Exception e) {...}<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Do someone have any idea how to achieve this?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Thanks<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Sebastien<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; rules-users mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
<br>
<br>
</div></div><font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-server-link-to-Guvnor-repository-tp2682663p2683847.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Drools-server-link-to-Guvnor-repository-tp2682663p2683847.html</a><br>

</font><div class="im">Sent from the Drools - User mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>