I am using Camunda Platform 7.18.
I am trying to populate options for a ‘Select’ element, however, it doesn’t seem to work.
I tried following this article:Options Source | Camunda Platform 8 Docs
Through the modeler, it seems to work perfectly.
However, when instead of manually, I try to output the same JSON via DMN, and the use that variable the populate the ‘Select’ element it doesn’t seem to work
However, the variable is clearly alive and well.
Does anyone know what am I missing?
(I can’t embed more than 1 picture, so I’m just going to link to an Imgur album if that’s okay: Imgur: The magic of the Internet)
Hi @Vladimir93 and welcome to the forum,
The form input in the modeler includes all variables required to populate the form. In your example, it is only
output1. In the actual process, you multiple variables each containing a value. To populate the
select element correctly, the value of
output1 should be the following:
"label": "English (UK)",
There is no need to include the variable name.
I hope this helps!
Hi @StephanHaarmann, thank you for your help!
However, after trying your suggestion, ‘select’ element still appears empty.
Again, the variable ‘output1’ can still be found in the process instance:
Is it possible that the format I’m outputting from DMN isn’t suitable?
In the Decision table I didn’t choose any variable type, I left it empty.
In the process instance, via Cockpit I can see that I get the type ‘Object’, like shown in the screenshot.
I tried changing the variable type to ‘JSON’ manually, through cockpit, and then copy pasting the value of ‘output1’ from your post, and it works!
There’s no ‘JSON’ type available in the Modeler for DMN though, and writing in manually only produces a variable with type ‘Object’ again. Is there a way to output a variable which the engine will recognize as JSON?
Intersting. Do you use Camunda Sping? Have you set JSON as your serialization format?
If it is still not working, I would try to add an explicit serialization in the Ouput Mapping of the decision or in the Input Mapping of the User Task.