You'd have to add both literal values to your enum definition:

USA
.*USA*

Sent on the move

On 13 Jan 2014 08:56, "abhinay_agarwal" <abhinay_agarwal@infosys.com> wrote:
Hi mike,

I am using advanced enum concepts, and my drop down values from the database
for a field lets say location.

When i use simple rule, it works fine. But, lets suppose I have a rule in
which I have to find if a particular string is inside location.

LOCATION like %USA%;

So inside guvnor i can write

LOCATION matches .*USA.*

But, while using enumerations, I don't get an option to write that. I can
just write:

LOCATION matches USA

which I guess is wrong.

Please let me know, if I can achieve what I want through guvnor or is it out
of the scope of the application.

Furthermore, if this functionality doesn't exists, I guess it would be a
great idea to allow user to decide if he wants to select data from list or
type something, because one rule may want the former and the second rule the
latter.

Regards,
Abhinay



--
View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656p4027666.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users