<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ok, I know what my problem is. Some mails ago I've asked about a
problem using a generic set. Because defining a generic set inside a
DRL file doesn't work, I'm using a non-generic set. And because of that
the object is of the type Object and not of the type ParameterValue. So
I have to make a cast.<br>
Sorry for bothering you. :-/<br>
<br>
Thanks anyone! :)<br>
<br>
Tina<br>
<br>
<blockquote cite="mid:4C6448E8.9060806@stud.hs-bremen.de" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Yeah, I think using a normal for loop is better. I just came up with
the question because I wanted to use a for-each-loop in a simple
exercise-scenario, because it's a bit faster to write... <br>
<br>
Anyway, what I wanted to do is:<br>
<br>
for (Value value : $eventSet) {<br>
// raise hell<br>
}<br>
<br>
Thats where I get the type mismatch.<br>
<br>
<br>
Thanks :)<br>
Tina<br>
<br>
<br>
<blockquote
cite="mid:AANLkTinur7pxp6n-7RVhJCycjV6Bi1Oi64GDRS-irkiE@mail.gmail.com"
type="cite">E.g., Joshua Bloch, "Effective Java", Item 46: Prefer <b>for-each
loops</b> to traditional for loops. Plain old Java.<br>
-W<br>
<br>
<div class="gmail_quote">2010/8/12 Mauricio Salatino <span
dir="ltr"><<a moz-do-not-send="true" href="mailto:salaboy@gmail.com">salaboy@gmail.com</a>></span><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Probably
I
misread the question.. I thought that Tina was asking about for each
loops in Drools Flow.<br>
If not where are you using for each??<br>
A java for each each node in the RHS?<br>
<br>
Greetings.<br>
<br>
<div class="gmail_quote">2010/8/12 Wolfgang Laun <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:wolfgang.laun@gmail.com"
target="_blank">wolfgang.laun@gmail.com</a>></span>
<div>
<div class="h5"><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I'm
not
sure whether you and Salboy are on the same wavelength. Tina,
please do provide more<br>
details where and what you want to for-each-loop. Guessing is a waste
of time...<br>
-W<br>
<br>
<div class="gmail_quote">2010/8/12 Tina Vießmann <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:tviessmann@stud.hs-bremen.de" target="_blank">tviessmann@stud.hs-bremen.de</a>></span>
<div>
<div><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">Oh, do I need a loop
xml definition? Good to know. -.-<br>
<br>
Could you give me a link with a good explanation/example about how to
do this?<br>
<br>
Thanks :)<br>
<br>
Tina <br>
<br>
<br>
<blockquote type="cite">The for each loop in Drools Flow
recieves a list of
objects to iterate over it.<br>
Can you share your loop xml definition? and can you check that the
variable that it's using is a list?<br>
<br>
<br>
<div class="gmail_quote">On Thu, Aug 12, 2010 at 1:08 PM,
Tina
Vießmann <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:tviessmann@stud.hs-bremen.de" target="_blank">tviessmann@stud.hs-bremen.de</a>></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;">Hi,<br>
<br>
is it possible to use the for each loop in Drools?<br>
The engine grouses a type mismatch : cannot convert from element type<br>
Object to Value<br>
<br>
Thanks :)<br>
Tina<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
- CTO @ <a moz-do-not-send="true" href="http://www.plugtree.com"
target="_blank">http://www.plugtree.com</a> <br>
- MyJourney @ <a moz-do-not-send="true"
href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br>
- Co-Founder @ <a moz-do-not-send="true" href="http://www.jbug.com.ar"
target="_blank">http://www.jbug.com.ar</a><br>
<br>
- Salatino "Salaboy" Mauricio -<br>
<br>
</blockquote>
</div>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
</blockquote>
</div>
</div>
</div>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
</blockquote>
</div>
</div>
</div>
<div>
<div class="h5"><br>
<br clear="all">
<br>
-- <br>
- CTO @ <a moz-do-not-send="true" href="http://www.plugtree.com"
target="_blank">http://www.plugtree.com</a> <br>
- MyJourney @ <a moz-do-not-send="true"
href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br>
- Co-Founder @ <a moz-do-not-send="true" href="http://www.jbug.com.ar"
target="_blank">http://www.jbug.com.ar</a><br>
<br>
- Salatino "Salaboy" Mauricio -<br>
</div>
</div>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
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>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
</body>
</html>