<div>Hi Edson,</div>
<div> </div>
<div>i have some problem...</div>
<div><strong>core_preference_text</strong> this my table name.Row like "VARIABLE_CODE" VARCHAR2(60 BYTE)"</div>
<div> </div>
<div>i need write dsl,dslr files related data validation to the table.<br></div>
<div>1. variable_code should be unieque per enterprise_id<br>2. variable_code can not be updated</div>
<div> </div>
<div> </div>
<div>give me some suggestion ..how to write dsl,dslr file related two conditions.ASAP..</div>
<div> </div>
<div>=====</div>
<div>Chanti<br></div>
<div><br> </div>
<div class="gmail_quote">On Fri, Jun 6, 2008 at 8:19 PM, Edson Tirelli <<a href="mailto:tirelli@post.com">tirelli@post.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br><br> 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>
<br> 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't know if there will be a 4.0.8 release or if the next release will be 5.0.<br>
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> []s<br> Edson<br><br><br><br>
<div class="gmail_quote">2008/6/6 Sibylle Duerr <sibylle.duerr@mymail.ch>:<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> Sibylle,<br><br> Unfortunately, this is the way it was implemented to be, under a kind-of "fail-fast" 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> Simply does not match, instead of raises a CCE, in case the model is a TypeModel.<br> But for 4.0.x, that is how things work.<br><br> 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> ...<br> public List getModels() {<br> if( this.models == null ) {<br> return Collections.emptyList();<br> }<br> return this.models;<br> }<br> ...<br>}<br> This is usually a good thing, unless you have a specific semantics for null collections in your domain model.<br>
<br> []s<br> Edson<br><br>2008/6/6 Sibylle Duerr <sibylle.duerr@mymail.ch>:<br><br> Hi there,<br><br> I have three issues, where I'm not sure if these are bugs in<br> drools, or if this is just the way it has to be.<br>
<br> the used classes in this case are:<br><br> Project<br> Model<br> ProcessModel extends Model<br><br> only the Project is in the working memory, because I didn't want<br> to load all elements due to performance issues (there can be<br>
thousends of elements to load at startup).<br><br> if I have the following rule:<br><br> Project($models : models)<br> ProcessModel($activities : activities) from $models<br><br> there happen to be two problems. if the project does not only<br>
contain ProcessModels but also TypeModels or others (all extend<br> Model), this leads to a ClassCastException.<br> I can solve this by writing the rule as follows:<br><br> Project($models : models)<br> $m : Model(eval($m instanceof ProcessModel)) from $models<br>
ProcessModel($activities : activities) from $m<br><br> but this is not really nice and I hope there is a better solution<br> for this, is there?<br><br> the second problem this rule gives me, is when the set 'models' is<br>
empty. that will also throw an exception. to solve this I write:<br><br> $p : Project(eval($p.hasModels()), $models : models)<br> $m : Model(eval($m instanceof ProcessModel)) from $models<br> ProcessModel($activities : activities) from $m<br>
<br> and I need to use this in each case where I have possible empty sets.<br><br><br> the last problem I encountered when I tried to load all elements<br> to the working memory and then redefine some rules. used classes:<br>
<br> Aggregation extends DomainElement<br><br> rule:<br><br> Aggregation(owner.owner != type.owner)<br><br> causes some exception. the root exception is a ClassCastException:<br> ProxyShadowProxy cannot be cast to Aggregation.<br>
when I rewrite the rule as:<br><br> $element : DomainElement(eval($element instanceof Aggregation))<br> Aggregation(owner.owner != type.owner) from $element<br><br> everything works fine. but that again is not a nice solution.<br>
<br> any help?<br><br> best regards<br> sibylle<br> _______________________________________________<br> rules-users mailing list<br></div></div> <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a> <mailto:<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>>
<div><br> <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> <<a href="http://www.jboss.com/" target="_blank">http://www.jboss.com</a>><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>
<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>