I have a scenario (as described below) where I need to check if a list contains any one of the values but I am trying to figure out a way to pass it as comma separated values.
Scenario:
We have a field called code which was of type String, and say the rule requirement is - If code is Code1 or Code2 or Code3, then perform some actions.We were able check for all the three codes - Code1, Code2 and Code3 in a same row in a decision table or in a guided rule too by putting comma separated values.Now, as per the new requirement we can have multiple codes in the request and hence we had to change the data type of code to List<String>;
Issue:
To check for each code, I have to put a new row in a guided decision table or an OR condition in a guided rule likecode contains Code1or code contains Code2or code contains Code3which earlier I was able to put as,code is contained in the (comma separated) list Code1, Code2, Code3.
Is there a way to check if the code (which is a List<String> now) contains any of the comma separated values?
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/e171302c-cf84-4b2c-aebc-6b5feceffcf9%40googlegroups.com.
In DRL terms you should be able to do something like:YourFact( $codes : codes )String( this in ("code1", "code2" ) ) from $codesThis can be created with both the Guided Rule Editor and Guided Decision Table Editor (using Free From Lines)
On 9 November 2017 at 15:42, AV <brinji...@gmail.com> wrote:
Any ideas / suggestions?Thanks,AV
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.