i have a hashmap/map of values
{item1: 1, item2: 2}
how can i use that in a decision table?
get value(quantity, “item1”) = 1 seems not working
Suppressed failure: illegal arguments: List(ValString({item1:1}), ValString(item1))
the quantity will be set from Java code as a simple string, looks like this: {item1:1}
what is wrong?
how can i write context expression in the decision table when my context looks like
{
item1: {something1: 1, something2: 2}
item2: {something1: 2, something3: 2}
}
and i want to have condition on “item1 → something1 has to be 1” for example
i tried something like
inputvariable.“item1”.“something1” → failure
inputvariable[“item1”][“something1”] → failure - expect List but found 'ValContext(StaticContext(Map(…
Niall
October 27, 2023, 11:29am
3
Can you give me a more exact example of the variable with a slightly clearer rule you’re trying to implement and i’ll see what i can do to help
{
“Delivery”: {
“properties”: 1,
“otheritem”: 2
},
“Extended”: {
“takeAway”: 1
}
}
or the input could look like this
{
“Delivery”: {
“otheritem”: 2
}
}
or no delivery at all
{
“Somethingelse”: {
“properties”: 1,
“otheritem”: 2
},
“Extended”: {
“takeAway”: 1
}
}
the problem is
everything is dynamic i don’t know in advance whether “Delivery”, or “Extended” or whatever other will exists in advance
get value(suborderitems, “Delivery”).properties = 1
seems to work, however, since i cannot know that for example “properties” exists or not… i have somehow “null check” it too
and i am completly stuck now…
this is in a decision table, the input variable name is suborderitems