How to access process variable in a UserTask -> Form


I’m creating a User Task with a form where I would like to be able to pass a process variable into one of the properties of one of the fields.
I set the variable in a Service Task that runs before the User Task, using delegateExecution.setVariable(“options”, “some-options”);

Then in Camunda modeler, I’d like to define this variable so that when the task is running, the property value would get resolved.

Would such a thing be possible?

Hey @mko ,

You need to use the same variable name in your form as in your delegation code. So you set the variable “options” in your Service Task. If you want to display the value in the user task you need to set the ID (process variable name) to “options” as well.

I hope that helps.
Kind regards

I would like to do the same thing.
Would you be able to send me a sample file?
Thanks in advance,