[rules-users] Is it possible to Iteriate over a list of string values ?
groovenarula
gnarula1 at la-z-boy.com
Wed Mar 9 01:19:16 EST 2011
Hello all,
In one of my use cases, I need to insert a variable collections of facts
into working memory in order to be able to test for those values later :
So I was wondering if there's a way to do something like this
when
$vals : String() from [ "A 12345", "B 45678", "C 8695" ]
then
insert ( new Fact ( $vals ) );
With the intention that the rule will fire 3 times and insert the 3 new
facts with the values " A 12345" and "B 45678" and "C 8695".
Is this possible using rules or do I have to resort to using functions. The
problem I'm trying to overcome is to see if there's a way to get the "A
12345", "B 45678", "C 8695" from a single cell of a spreadsheet.
Thanks in advance,
G
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Is-it-possible-to-Iteriate-over-a-list-of-string-values-tp2654135p2654135.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list