I have a workflow that is looping using a json object that has an array of json objects (devices). I wish to publish the item into the context as variable foo, as follows:
…
…
render_template:
with:
items: device in <% ctx(mop_automation_object).devices %>
concurrency: 1
action: mop_automation.render_template
input:
device: <% item(device) %>
next:
- when: <% succeeded() and … %>
publish:
- cli_templates: <% result().result %>
- foo: <% item() %>
do: cli_workflow
cli_workflow:
action: mop_automation.mop_automation_cli_workflow
input:
device: <% ctx().foo %>
templates: <% ctx().cli_templates %>
skip_approval: false
next:
- when: <% succeeded() %>
It seems to be empty, am i doing something wrong, or is that not possible.