Passing fields to external groovy script

Hi all.

It’s possible do pass fields to an external groovy script?
I’m trying to use the field injection but without success. How can the field value be used in the script?

Thanks for the help.

Hi,

You don’t need to use field injection, but you can simply reference process variables by their name. https://docs.camunda.org/manual/7.9/user-guide/process-engine/scripting/#variables-available-during-script-execution is the relevant documentation on this.

Cheers,
Thorben