Use of "contains" operator does not add values from enumeration with quotes in Guided Rules

Solution Unverified - Updated -

Issue

  • When using the operator contains on a field condition in Guided rules, it is necessary to put the values in quotes e.g. "DATA" instead of just DATA. This prevents the use of enumerators for dropdowns on the data sheet. The challenge is if there is a field of a fact which is declared as a List (e.g. List of String type of facts) and user tries to use this field with enumeration, with an intention that the options to select some values for the field could be limited to values available through the enumeration when user selects it from a dropdown in Guided rule.
  • In above scenario, if users use an enumerator the values that get selected for the field on the data sheet, it is observed to be missing quotes in the compiled rule, thus generating an error during validation or building the project as shown below.
[Line: 8, Column: 2] : [Rule name='SimpleEnumGuidedRule']

Unable to Analyse Expression @Modify with( f1 ) { setFactOne( one ) }

;:
[Error: unable to resolve method using strict-mode: org.drools.core.spi.KnowledgeHelper.one()]
[Near : {... @Modify with( f1 )
{ setFactOne( one ) }

; ....}]
^

How to solve this issue?

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 6.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content