var processInstanceId = execution.getProcessInstanceId(); var ansiblePayload = S('{}'); var extra_vars = S('{}'); extra_vars.prop('camunda_process_instance_id', processInstanceId); ansiblePayload.prop('extra_vars', extra_vars); execution.setVariable('ansiblePayload', ansiblePayload);