Guvnor provides for the means to author rules, not consume them.<br><br>There&#39;s no capabilities to insert your objects (other than when writing test scenarios for your rules). This would be the realm of KnowledgeSessions and *your* application.<br>
<br>If however you want your application (you do state &quot;...in our web frontend&quot;) to be able to retrieve either a list of objects or a single one depending on whether the ID is provided then:-<br><br>(a) I&#39;d have thought you could simply achieve this without using a Rule Engine<br>
<br>(b) If you want to use a rule engine then: insert all YourObjects into Working Memory and use Drools Queries to achieve your need with queries a bit like these:-<br><br>query &quot;all objects&quot; <br>    $l : ArrayList( ) from collect( YourObject( ) )<br>
end<br><br>query &quot;an objects&quot; (int $id )<br>
    $l : YourObject( id == $id )<br>
end<br><br>Have I missed your point?<br><br><div class="gmail_quote">2011/7/6 Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I suspected something like that, but <i>matching </i>facts of type System from Working Memory and <i>inserting </i>recreated facts of the same type isn&#39;t going to get them nearer to the GUI?<br><font color="#888888"><br>
-W</font><div><div></div><div class="h5"><br><br><br><div class="gmail_quote">
On 6 July 2011 13:10, _bart <span dir="ltr">&lt;<a href="mailto:dgrundler@doubleslash.de" target="_blank">dgrundler@doubleslash.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Ok I will describe it again:<br>
<br>
We want to administrate some objects in guvnor. Every object has one id, one<br>
name and one description. We have round about 100 objects.<br>
<br>
One use case is, that all objects (id, name and description) should be<br>
displayed in a drop down box in our web frontend.<br>
The next use case is, that it has to be possible to load one object (id,<br>
name, decription) by id.<br>
<br>
My solution in pseudo code for the rule is:<br>
<br>
IF id IS SET search object and return it or return null if not exist.<br>
IF ID IS NOT SET return all objects.<br>
<br>
So I need a rule for these requirements. The rule above returns the object<br>
specified by id correctly (the id will be set with id $system.getId()).<br>
Also the rule above returns all objects from the data table. But the id is<br>
missing in every object.<br>
<br>
I hope it is clear now.<br>
Maybe my approach is wrong?<br>
<font color="#888888"><br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Drools-Guvnor-problem-tp3142574p3144308.html" target="_blank">http://drools.46999.n3.nabble.com/Drools-Guvnor-problem-tp3142574p3144308.html</a><br>


</font><div><div></div><div>Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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>
</div></div><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>