<div>Hi Edson,</div>
<div>&nbsp;</div>
<div>i have some problem...</div>
<div><strong>core_preference_text</strong> this my table name.Row like &quot;VARIABLE_CODE&quot; VARCHAR2(60 BYTE)&quot;</div>
<div>&nbsp;</div>
<div>i need write dsl,dslr files&nbsp;related data validation&nbsp;to the table.<br></div>
<div>1.&nbsp;variable_code should be unieque per enterprise_id<br>2.&nbsp;variable_code can not be updated</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>give me some suggestion ..how to write dsl,dslr file related two conditions.ASAP..</div>
<div>&nbsp;</div>
<div>=====</div>
<div>Chanti<br></div>
<div><br>&nbsp;</div>
<div class="gmail_quote">On Fri, Jun 6, 2008 at 8:19 PM, Edson Tirelli &lt;<a href="mailto:tirelli@post.com">tirelli@post.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Drools 5 implements a completely new propagation algorithm that allowed us to get rid of shadow proxies from the core engine. So, you will not have the problem. <br>
&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; But for 4.0.x, if you are a community user, best you can do is open a JIRA with a test case to reproduce your problem. If we release a 4.0.8 version, we can fix your issue there, but at this moment we don&#39;t know if there will be a 4.0.8 release or if the next release will be 5.0.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If you are a Drools subscriber at Red Hat, then you can simply open a support case there and they will fix and provide a patch for you. 
<div>
<div></div>
<div class="Wj3C7c"><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; []s<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edson<br><br><br><br>
<div class="gmail_quote">2008/6/6 Sibylle Duerr &lt;sibylle.duerr@mymail.ch&gt;:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Thanks Edson,<br><br>but the collections do return an empty collection. hm, I just tested this ones again and it worked fine. no exception when the set was empty. I will keep an eye on this and test some more but seems to work now for me.<br>
<br>and for the other problem I then hope for 5.0 :).<br><br>and what about the last problem I described before?<br><br>best regards<br>Sibylle<br><br><br><br>Edson Tirelli wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div></div>
<div><br><br>&nbsp; Sibylle,<br><br>&nbsp; Unfortunately, this is the way it was implemented to be, under a kind-of &quot;fail-fast&quot; philosophy we were following. I do think there is value in changing things in 5.0 so that, for instance:<br>
<br>ProcessModel($activities : activities) from $models<br><br>&nbsp; Simply does not match, instead of raises a CCE, in case the model is a TypeModel.<br>&nbsp; But for 4.0.x, that is how things work.<br><br>&nbsp; &nbsp;The only suggestion I can give you is, in your second problem, to not return null on your collections. Simply return empty collections:<br>
<br>class Project {<br>&nbsp; ...<br>&nbsp; public List getModels() {<br>&nbsp; &nbsp; &nbsp; &nbsp;if( this.models == null ) {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return Collections.emptyList();<br>&nbsp; &nbsp; &nbsp; &nbsp;}<br>&nbsp; &nbsp; &nbsp; &nbsp;return this.models;<br>&nbsp; }<br>&nbsp; ...<br>}<br>&nbsp; &nbsp; This is usually a good thing, unless you have a specific semantics for null collections in your domain model.<br>
<br>&nbsp; &nbsp;[]s<br>&nbsp; &nbsp;Edson<br><br>2008/6/6 Sibylle Duerr &lt;sibylle.duerr@mymail.ch&gt;:<br><br>&nbsp; &nbsp;Hi there,<br><br>&nbsp; &nbsp;I have three issues, where I&#39;m not sure if these are bugs in<br>&nbsp; &nbsp;drools, or if this is just the way it has to be.<br>
<br>&nbsp; &nbsp;the used classes in this case are:<br><br>&nbsp; &nbsp;Project<br>&nbsp; &nbsp;Model<br>&nbsp; &nbsp;ProcessModel extends Model<br><br>&nbsp; &nbsp;only the Project is in the working memory, because I didn&#39;t want<br>&nbsp; &nbsp;to load all elements due to performance issues (there can be<br>
&nbsp; &nbsp;thousends of elements to load at startup).<br><br>&nbsp; &nbsp;if I have the following rule:<br><br>&nbsp; &nbsp;Project($models : models)<br>&nbsp; &nbsp;ProcessModel($activities : activities) from $models<br><br>&nbsp; &nbsp;there happen to be two problems. if the project does not only<br>
&nbsp; &nbsp;contain ProcessModels but also TypeModels or others (all extend<br>&nbsp; &nbsp;Model), this leads to a ClassCastException.<br>&nbsp; &nbsp;I can solve this by writing the rule as follows:<br><br>&nbsp; &nbsp;Project($models : models)<br>&nbsp; &nbsp;$m : Model(eval($m instanceof ProcessModel)) from $models<br>
&nbsp; &nbsp;ProcessModel($activities : activities) from $m<br><br>&nbsp; &nbsp;but this is not really nice and I hope there is a better solution<br>&nbsp; &nbsp;for this, is there?<br><br>&nbsp; &nbsp;the second problem this rule gives me, is when the set &#39;models&#39; is<br>
&nbsp; &nbsp;empty. that will also throw an exception. to solve this I write:<br><br>&nbsp; &nbsp;$p : Project(eval($p.hasModels()), $models : models)<br>&nbsp; &nbsp;$m : Model(eval($m instanceof ProcessModel)) from $models<br>&nbsp; &nbsp;ProcessModel($activities : activities) from $m<br>
<br>&nbsp; &nbsp;and I need to use this in each case where I have possible empty sets.<br><br><br>&nbsp; &nbsp;the last problem I encountered when I tried to load all elements<br>&nbsp; &nbsp;to the working memory and then redefine some rules. used classes:<br>
<br>&nbsp; &nbsp;Aggregation extends DomainElement<br><br>&nbsp; &nbsp;rule:<br><br>&nbsp; &nbsp;Aggregation(owner.owner != type.owner)<br><br>&nbsp; &nbsp;causes some exception. the root exception is a ClassCastException:<br>&nbsp; &nbsp;ProxyShadowProxy cannot be cast to Aggregation.<br>
&nbsp; &nbsp;when I rewrite the rule as:<br><br>&nbsp; &nbsp;$element : DomainElement(eval($element instanceof Aggregation))<br>&nbsp; &nbsp;Aggregation(owner.owner != type.owner) from $element<br><br>&nbsp; &nbsp;everything works fine. but that again is not a nice solution.<br>
<br>&nbsp; &nbsp;any help?<br><br>&nbsp; &nbsp;best regards<br>&nbsp; &nbsp;sibylle<br>&nbsp; &nbsp;_______________________________________________<br>&nbsp; &nbsp;rules-users mailing list<br></div></div>&nbsp; &nbsp;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a> &lt;mailto:<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt; 
<div><br>&nbsp; &nbsp;<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br><br><br><br>-- <br>Edson Tirelli<br>JBoss Drools Core Development<br>
Office: +55 11 3529-6000<br>Mobile: +55 11 9287-5646<br></div>JBoss, a division of Red Hat @ <a href="http://www.jboss.com/" target="_blank">www.jboss.com</a> &lt;<a href="http://www.jboss.com/" target="_blank">http://www.jboss.com</a>&gt;<br>
------------------------------------------------------------------------ 
<div><br><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>
&nbsp;<br></div></blockquote>
<div>
<div></div>
<div>_______________________________________________<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><br clear="all"><br>-- <br>Edson Tirelli<br>JBoss Drools Core Development<br>Office: +55 11 3529-6000<br>Mobile: +55 11 9287-5646<br>JBoss, a division of Red Hat @ <a href="http://www.jboss.com/" target="_blank">www.jboss.com</a> </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>