Hi,
Within my dmn table I like to get access to a variable but the variable name is dynamically determined based on a counter. So I have variables that named like:
article_0
article_1
article_2
Now I have loop in my BPMN and an activity that calls the DMN business rule that needs access to the article_[counter] variable. I want to use a literal expression to handle this part and simply use in my DMN table the input variable articleValue
I can’t seem to find how I can use a dynamically determined variable name in DMN.
I know I can define an input variable in my bpmn activity and then do something like → execution.getVariable(“item_” + execution.getVariable(“counter”)) but then I am moving this logic to my bpmn activity while I think the literal expression would be better to use. I found on a forum a reference to variableContext.resolve but when I use it in DMN literal expression it says that there is no variableContext variable.
So how do I get access to the context variable within a DMN literal expression?
Hope my question makes sense