I want to invoke ansible job over http connector with payload as extra vars to the job.
I am using the following javascript , i am able to invoke the ansible job , however the extra vars are empty, and the job fails.
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);
please suggest why the above scritpt is enable to send processinstanceID as payload to the extravars of the ansible job.
Regards
Prabhu