def env = [
  process_instance_id: execution.getProcessInstanceId(),
  scope_id: contextScopeId,
  smardigo_management_action: smardigoManagementAction,
  stage: cluster.stage,
  database_engine: databaseEngine,
]
if (binding.hasVariable('extraVariables')) {
  env << extraVariables
}

env