Hi,<br><br>Guvnor is an authoring and repository environment not a runtime environment.<br><br>Please read about KnowledgeBuilder and its related &quot;addResource&quot; methods together with the <span>ResourceType.PKG. You can also look at using KnowledgeAgent but for now an understanding of KnowledgeBuilder will suffice. I also recommend you read about rule invocation, as your example of how you expect operation &quot;rules.execute&quot; suggests you have not read the &quot;Expert&quot; documentation.<br>
<br>With kind regards,<br><br>Mike<br></span><br><div class="gmail_quote">On 20 April 2011 12:39, Mario Viertel <span dir="ltr">&lt;<a href="mailto:Mario.Viertel@medav.de">Mario.Viertel@medav.de</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;">
Hi all,<br>
<br>
I am new in Guvnor and have a lot of questions.<br>
I have created a decision table with the Guvnor web app. I have also<br>
created some test. All seems to be fine.<br>
<br>
Now I want to use the rules in a web application. Unfortunately Guvnor<br>
doesn&#39;t provide a web service interface so I must develop an own web<br>
service to deal with the rules. But thats not so easy ...<br>
<br>
In the Guvnor documentation I can see how to create KnowledgeBases and<br>
builders and how to fire rules. But I cannot see how to receive rule<br>
results.<br>
<br>
Example:<br>
<br>
The decision table looks similar like this:<br>
<br>
rule 1 &quot;under age&quot;<br>
if person.age &lt; 18 then &quot;under age&quot;<br>
<br>
rule 2 &quot;pensioner female&quot;<br>
if person.age &gt; 64 and person.gender == &quot;female&quot; then &quot;pensioner&quot;<br>
<br>
rule 3 &quot;pensioner male&quot;<br>
if person.age &gt; 67 and person.gender == &quot;male&quot; then &quot;pensioner&quot;<br>
<br>
rule 4 &quot;full age&quot;<br>
* then &quot;full age&quot;<br>
<br>
<br>
In my java application I create a person object:<br>
<br>
Person p = new Person();<br>
p.setBirthday(...);<br>
p.setGender(...);<br>
<br>
Now I miss a method in the Guvnor api to exectute the rules and receive<br>
the result like this:<br>
<br>
Person result = (Person) rules.execute(p);<br>
<br>
Can somebody explain how to execute a rule and receive the result.<br>
<br>
Thanks in Advance<br>
<font color="#888888">Mario Viertel<br>
Germany<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>
</font></blockquote></div><br>