Couldn't able to access start form variables in script task

Hi All,
I am trying to configure some variables in the start form and try to access those in the script task. But it is not working as expected. I couldn’t able to access the form variables. Am i missing out something ?

Below is the variable configured and i am getting this variable using execution.getVariable(“sampleConfig”)

Kindly help !

Regards,
Sriram B

Hi All,
Is there a way to access the start form variables in the script task… I tried a way as below, but doesn’t help.

def processInstance = execution.getProcessInstance()
def Object sampleConfig = processInstance.getVariable(“sampleConfig”)

Kindly suggest a solution.

Regards,
Sriram B

Hey @sriramb,

You can access all variables that have been passed when creating the process instance in the way you shared: i.e.

def processInstance = execution.getProcessInstance()
def Object sampleConfig = processInstance.getVariable(“sampleConfig”)

How are you starting the process instance?

Hi @filiphr ,

I am able to access the variables which are passed when creating the instance.

Thank you !