Hi Carlos,<div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">1) Can this be done dynamically? I meant, will the workflow change as soon as I save the new rules on any pre-existing package? </div>

<div>No, you have to re-build the package manually. There is some REST API you can use if you want to add some degree of automation. </div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">2) Would this allow me to add workflow steps and rules as well as general data entities?</div>

<div>Not sure what you mean by &quot;workflow steps&quot; here. You can have a mix of declared and imported (from a jat) entities.</div><div><br clear="all"><meta http-equiv="content-type" content="text/html; charset=utf-8">3) What should I have in me interface to be able to use Drools as me rules engine? I don&#39;t get it yet...</div>

<div>Drools is just a framework, so you will need to embed it in your application. The basic steps are:</div><div><br></div><div>//1.- Create a kbuilder</div><div>KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); </div>

<div><br></div><div>//2.- Add resources to kbuilder: you could use different Resources and different ResourceTypes too</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>kbuilder.add(new FileSystemResource(&quot;./event-rules.drl&quot;), ResourceType.DRL);</div>

<div><br></div><div>//3.- Create a kbase</div><div>KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();</div><div><br></div><div>//4.- Add packages from kbuilder to kbase</div><div>kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());</div>

<div><br></div><div>//5.- Create a session. </div><div>ksession = kbase.newStatefulKnowledgeSession();</div><div><br></div><div>//6.- Play with the session</div><div>ksession.insert()/update()/fireAllRules() etc.</div><div>

<br></div><div><br></div><div>If you are planning to read the rules from guvnor you can use an URLResource in step 2.</div><div><br></div><div>Best Regards,</div><div><br></div><div><br></div><div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>

<br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>


<br><br><div class="gmail_quote">2011/3/30 Carlos Santiago Moreno <span dir="ltr">&lt;<a href="mailto:ingcsmoreno@gmail.com">ingcsmoreno@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi everyone, I have been working out with Drools, and a few more doubts have appeared.<br><br>In Guvnor, each rule is defined inside a package. When you create a new rule you must define the package where it belongs. Guvnor doesn&#39;t create any kbase, you can see a package (in Guvnor) like a DRL file split in  different parts: the imports, the globals, each rule, etc. So Guvnor is only in charge of maintain different versions of that DRLs.<br>


1) Can this be done dynamically? I meant, will the workflow change as soon as I save the new rules on any pre-existing package? <br><br>If I declare the entities in Guvnor, this will use the &quot;declare&quot; keyword to define a New Data Type. Now...<br>


2) Would this allow me to add workflow steps and rules as well as general data entities?<br><br>and, the last one<br><br>3) What should I have in me interface to be able to use Drools as me rules engine? I don&#39;t get it yet...<br>


<br>And if you can recomend me any web site with information about all this things it&#39;ll be nice.<br><br>Thanks<br><br>Carlos S. Moreno<br>
<br>_______________________________________________<br>
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>
<br></blockquote></div><br></div>