<br>   Looks like a bug on the type enforcement that Drools and MVEL try to apply. Even with the generic type erasure, there should be no problems with either expression. <br><br>   What specific versions of Drools and MVEL are you using?<br>
<br>   Edson<br><br><br><div class="gmail_quote">2010/1/31  <span dir="ltr">&lt;<a href="mailto:rouvas@di.uoa.gr">rouvas@di.uoa.gr</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Wolfgang Laun wrote:<br>
&gt; 2010/1/31 &lt;<a href="mailto:rouvas@di.uoa.gr">rouvas@di.uoa.gr</a>&gt;<br>
&gt;<br>
&gt;&gt; Wolfang,<br>
&gt;&gt;<br>
&gt;&gt; thank you very much for your reply.<br>
&gt;&gt;<br>
&gt;&gt; Your assumptions are correct and your explanation makes sense.<br>
&gt;&gt; Unfortunately, I cannot understand why this happens.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; It may very well be an implementation restriction; whether it can be<br>
&gt; removed easily I&#39;m not prepared to say. (@Edson?)<br>
<br>
</div>Fair enough.<br>
<div class="im"><br>
&gt;<br>
&gt;<br>
&gt;&gt; The IUEcop has the following structure (in rough terms)<br>
&gt;&gt;  IUEcop<br>
&gt;&gt;   +- (various objects as properties)<br>
&gt;&gt;   +- list of traderAuthorisation<br>
&gt;&gt;   +- list of warehouseAuthorisation<br>
&gt;&gt;   +- list of temporaryAuthorisation<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; A more general issue with my understanding has to do with handling of<br>
&gt;&gt; deeply nested objects. In my case, the &quot;traderAuthorisation&quot; object has<br>
&gt;&gt; itself another set of object properties and lists that I would like to<br>
&gt;&gt; refer to in my rules. Are you aware of any relevant documentation?<br>
&gt;&gt;<br>
&gt;<br>
&gt; Nested objects that are not facts but shared between fact objects should<br>
&gt; not<br>
&gt; cause any problems; especially the MVEL syntax is provided for easy<br>
&gt; access to properties of a property.<br>
&gt;<br>
&gt; If such an object is shared among several fact objects, you&#39;ll have a<br>
&gt; problem whenever such a shared object is updated by code on a RHS:<br>
&gt; To trigger reevaluation of rules, the engine would have to be<br>
&gt; notified about all objects referring to the shared object as being<br>
&gt; updated.<br>
<br>
</div>Although in my case the objects are not shared, I understand the issues<br>
involved.<br>
<div class="im"><br>
&gt;<br>
&gt; Lists is adding another twist, even though the &quot;from&quot; CE appears<br>
&gt; to simplify handling of Iterable properties and works well enough.<br>
&gt; The recommended (see Drools Expert, section 4.8.2.8, Conditional<br>
&gt; Element &quot;from&quot;) alternative is to add List elements as WM elements<br>
&gt; of their own,<br>
<br>
</div>I was hoping to avoid this.<br>
This is how I was doing things in Prolog, but I was hoping that<br>
object-orientation would help tackling this issue.<br>
<br>
Anyway, thanks a lot for your help.<br>
<br>
-Stathis<br>
<div class="im"><br>
&gt; even though this may require the addition of linking<br>
&gt; information to the list elements. (In your case: a TraderAuthorisation<br>
&gt; would have to contain a reference to the IUEcop object it belongs<br>
&gt; to.) You&#39;ll have to balance the additionally required coding effort<br>
&gt; for this against the greater complexity of rules using &quot;from&quot;.<br>
&gt;<br>
&gt; -W<br>
&gt;<br>
&gt;<br>
&gt;&gt; Thank you very much for your time,<br>
&gt;&gt; -Stathis<br>
&gt;&gt;<br></div></blockquote></div><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>