How to use variable type collection in decision table

Hi,

I have use case where I need to check input value match all of the (‘val1’,‘val2’,‘val3’) in decision table.

What would be the input looks like in this case?

{
“decisionKey”:“TEST_RULE”,
“inputVariables”:[
{
“name”:“input”,
“value”:“val1,val2,val3”
}
]
}

Hi @pardeep131085

In order to create an expression to checks if the String values val1, val2 and val3 are present in the collection named input you can create a rule like this;

Input needs to be a Java Collection or a Json ArrayNode.

Hope this helps.

Yvo

Thanks @yvo

{
“decisionKey”: “DEC_TABLE”,
“inputVariables” : [
{
“name”:“input”,
“value”:“val1,val2,val3”
}
]
}

This input is working fine,

How we make this comparison case insensitive?

Means this input should also works
{
“decisionKey”: “DEC_TABLE”,
“inputVariables” : [
{
“name”:“input”,
“value”:“VAL1,val2,val3”
}
]
}

For custom logic like this I would suggest creating your own function delegate.
This is not possible with the provided ones.

Yvo

Thanks
Can you give some idea how should I start writing own delegates?
Any references or examples.

In one of your recent questions I replied referring to the documentation about function delegates.

Did that provide you with enough info or do you need additional help?

Yvo

Let me go through it once again,

Appreciate your reply @yvo