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”
}
]
}
yvo
November 3, 2020, 8:19am
2
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”
}
]
}
yvo
November 3, 2020, 4:27pm
4
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.
yvo
November 3, 2020, 4:44pm
6
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
akki
January 28, 2021, 7:44am
8
Hi @pardeep131085 can you share the documentation link which Yvo was referring to in his last reply
yvo
January 28, 2021, 8:04am
9
Hi @akki
This is the mentioned documentation;
## Creating a DMN Engine
The code of the default implementations can be found here;
Hope this helps.
Regards,
Yvo
1 Like