DMN Modeler "IS IN" operator functionality

Hi All,

I have a small problem when designing a Decision table.
I am trying to use the “IS IN” operator to find if my input which is a integer is present in the given list/array.
Here is the image of what I am trying to do.

The input marked using the red bracket doesn’t work , while the input marked using green works.
So here I see the following issues

  1. Am not able to set a list of integers like 100,101,102 , as you can see the expression filed appears red.

  2. Even if I go ahead ignoring the modeler error, flowable engine is not fetching the desired output when I pass fromOffer as integer and execute the decision.
    On the other hand if pass the fromOffer variable as string it works.

On debugging I found that this expression is called

collection:allOf(‘100,101,102’, fromOffer)

and on the corresponding CollectionUtil class, this param ‘100,101,102’ is considered as list of String and this param fromOffer is considered as BigInteger, and thus the expression is returning false.

I know the easy way around is to use “string” as variable type, and pass fromOffer as string.
and other way is to use custom expression using customFlowableFunctionDelegate ,
but I just want to confirm that is it not possible to use “IS IN” operator with a list of integers?

Can you guys please advise?

Here is an input request sample for executing the decision

   {
      "decisionKey": "offerSwapDecision",
      "inputVariables": [
        {
          "name": "fromOffer",
          "type": "integer",
          "value": 100
        },
       {
          "name": "toOffer",
          "type": "string",
          "value": "101"
        },
       {
          "name": "offerCreationDate",
          "type": "date",
          "value": "2020-03-30T12:30:00Z"
        }
      ]
    }

Thanks,
Robin

Hi,

it seems you’ve found a bug (two actually).
The validator in the modeler is a missing some of the collection operators. This causes the validation error.

The other one caused an issue when parsing the provided collection to be handled as Strings (as you mentioned correctly).
I’m fixing both.

Thanks for pointing it out.

Regards,

Yvo

Hi Yvo,

Thanks for the prompt response.
I guess we will use variable type as “string” till the fix.
Will be great if you can let me know once the fix is done.

Regards,
Robin

Hi Robin,

the fixes are on master.

Regards,

Yvo

Hi Yvo,

Great! that was fast :slight_smile:
Just looked at the PR #2273.

Thanks,
Robin