How to declare variables which are used in execution flows

When I try to deploy a model with a condition after gateway, i’ve got:
Unknown property used in expression: ${var1 == 1}. Cause: Cannot resolve identifier ‘var1’

So the only way to solve is to define variable as output parameter on task before the gateway?

Hi @pswrdf,

there are number of ways to set the execution variable. E.g. you can provide the required variable, when starting the process: https://docs.camunda.org/manual/7.7/reference/rest/process-definition/post-start-process-instance/#request (REST API). Or you can call execution.serVariable("var1", ...) in Service task.

More info about variable can be found here: https://docs.camunda.org/manual/7.4/user-guide/process-engine/variables/