Use Variables passed to DMN in DMN Output

All ,

We are having a DMN table and we call the DMN table directly via decisionService
.evaluateDecisionByKey() and there is no process involved . We are having couple of variables which we are setting via the VariableMap before calling the DMN table . We want to leverage few of the variables passed in the “OUTPUT” of the DMN table . This doesnt seem to work . PFB the sample file . Do let us know if this is something that is suported . I tried in the DMN simulator and it gives the same issue . VariableinOutputDMN.dmn (1.4 KB)

Hi @dineshsb,

three things:

  1. you should not use the InputVariable but put the entry into InputExpression
  2. In the output, a string concatenation is not supported
  3. You misspelled the variable in the output entry.

After correcting this, the decision table worked for me in the simulator.

Hope this helps, Ingo

1 Like

Hi @Ingo_Richtsmeier ,

Thanks for your comments . I have corrected the spelling mistake .My requirement is to build dynamic output text using few input variables . For example if the “ActivityType” is 'Run" the out put should be " Activitiy Initiated for Run " . Is this not supported ?

Hi @Ingo_Richtsmeier - Can you please provide confirmation on my query .

Hi @dineshsb,

I’ve double checked your case. with a right click in the output entry you can change it from JUEL to Java script. In Javascript you write

"Activity initiated for " +  ActivityType

to get the required result.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier , I have tried what you have suggested by changing it to Javascript and I still keep getting the error . Please find below the screenshot of the DMN simulator . I made sure there are no spelling mistakes this time :slight_smile: . Please let me know if there is anything else i need to do .

Hi @dineshsb,

This is missing.

Hope this helps, Ingo

Hi @Ingo_Richtsmeier - Thanks for being patient with me and providing your inputs . Once i changed input to JUEL + input expression and the output to Javascript it started working .

Can you please add the working DMN?