Hi,<br><br>Guvnor is an authoring and repository environment not a runtime environment.<br><br>Please read about KnowledgeBuilder and its related "addResource" 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 "rules.execute" suggests you have not read the "Expert" 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"><<a href="mailto:Mario.Viertel@medav.de">Mario.Viertel@medav.de</a>></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'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 "under age"<br>
if person.age < 18 then "under age"<br>
<br>
rule 2 "pensioner female"<br>
if person.age > 64 and person.gender == "female" then "pensioner"<br>
<br>
rule 3 "pensioner male"<br>
if person.age > 67 and person.gender == "male" then "pensioner"<br>
<br>
rule 4 "full age"<br>
* then "full age"<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>