Correct me if I misunderstand:-
(1) You have a list of Strings accessible using a generic "businessData"
property.
(2) Nestled within the list *you happen to know* one of the values
represents a SSN and another the loan amount.
(3) You expect Drools to read your mind and workout how to determine the
meaning of individual items in the list.
You can check whether the "businessData" contains a value using the
"contains" operator. Whether the value is however a SSN or a loan amount
is anyones guess as demonstrated below. If you don't have discrete
accessors for individual businessData items then I believe a map is your
best option.
Rule "read my mind"
When
$p : ProcessRequest(businessData contains "1234")
Then
System.println("ProcessRequest contains '1234' however I have no
idea whether it is a SSN or loan amount");
End
With kind regards,
Mike
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of VinuJay
Sent: 11 June 2009 07:39
To: rules-users(a)lists.jboss.org
Subject: Re: [rules-users] Inserting Collection into WorkingMemory
Hi Andrew,
Thanks for the reply.
My problem is i don't have any input values for businessdata, i need to
evaluate only on the key (name) of business data. Like if SSN == 1234
&&
LoanAmount > 50000 assign to jcooper
So List<String,String> businessData in my Fact object would not be
useful. I
need the values for the business data to be picked up from the rules
file
(.drl) itself.
--
View this message in context:
http://www.nabble.com/Inserting-Collection-into-WorkingMemory-tp23975474
p23976147.html
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users