The Expert documentation states &quot;<a id="d0e4708">The expression used to define the object source is any expression
      that follows regular MVEL syntax.&quot; T</a>herefore &quot;from&quot; should be able to use the MVEL syntax for arrays [&quot;one&quot;, &quot;two&quot;, &quot;three&quot;] however I&#39;ve not tried and never seen it used. Normally people use &quot;from&quot; to iterate over a dynamic list created elsewhere (another Fact pattern, a global etc). Since you say you need to handle &quot;variable collections&quot; I&#39;d have thought the latter use-case more suitable for yor needs. something like:-<br>
<br>when<br>    $pch : ParsedCellHolder( )<br>    $val : String( ) from $pch.getStrings( )<br>then<br>    insert( new Fact( $val ) );<br>end<br><br>Of course one begs to ask why you don&#39;t simply insert the individual values into WM as the spreadsheet is parsed?<br>
<br>You&#39;ll be doing something like that to either construct the static MVEL in your example or a list.<br><br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 9 March 2011 06:19, groovenarula <span dir="ltr">&lt;<a href="mailto:gnarula1@la-z-boy.com">gnarula1@la-z-boy.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hello all,<br>
<br>
In one of my use cases, I need to insert a variable collections of facts<br>
into working memory in order to be able to test for those values later :<br>
<br>
So I was wondering if there&#39;s a way to do something like this<br>
<br>
    when<br>
        $vals : String() from [ &quot;A 12345&quot;, &quot;B 45678&quot;, &quot;C 8695&quot; ]<br>
    then<br>
         insert ( new Fact ( $vals ) );<br>
<br>
With the intention that the rule will fire 3 times and insert the 3 new<br>
facts with the values &quot; A 12345&quot; and &quot;B 45678&quot; and &quot;C 8695&quot;.<br>
<br>
Is this possible using rules or do I have to resort to using functions. The<br>
problem I&#39;m trying to overcome is to see if there&#39;s a way to get the  &quot;A<br>
12345&quot;, &quot;B 45678&quot;, &quot;C 8695&quot;  from a single cell of a spreadsheet.<br>
<br>
Thanks in advance,<br>
G<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Is-it-possible-to-Iteriate-over-a-list-of-string-values-tp2654135p2654135.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Is-it-possible-to-Iteriate-over-a-list-of-string-values-tp2654135p2654135.html</a><br>

Sent from the Drools - User mailing list archive at Nabble.com.<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>
</font></blockquote></div><br>