action under with-items doesn't take non-array parameters
Bug #1426258 reported by
Dmitri Zimine
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
High
|
Nikolay Makhotkin |
Bug Description
https:/
Filing for Winson:
Currently, if an action has multiple inputs, all the inputs need to be in the with-items array. There are cases where the action inputs can come from a previous published variables or WF inputs and they are not in an array.
Example:
with-items: name in vm_names
action: do_something n=<% name %> foo=<% my_published_var %>
Changed in mistral: | |
status: | Incomplete → Fix Released |
Changed in mistral: | |
milestone: | none → kilo-rc1 |
Changed in mistral: | |
milestone: | kilo-rc1 → 2015.1 |
assignee: | nobody → Nikolay Makhotkin (nmakhotkin) |
To post a comment you must log in.
Please take a look at this test: https:/ /github. com/stackforge/ mistral/ blob/master/ mistral/ tests/unit/ engine1/ test_with_ items.py# L55-L75 /github. com/stackforge/ mistral/ blob/master/ mistral/ tests/unit/ engine1/ test_with_ items.py# L175-L201
here: https:/
It means that with-items should work fine with all data_context.
Moreover, I tried to test it manually:
1. Created workbook
version: "2.0" google. com?q=<% $.q %>!"
name: wi
workflows:
with_items:
type: direct
input:
- queries
- method
tasks:
task1:
with-items: q in <% $.queries %>
action: std.http method=<% $.method %> url="http://
publish:
result: <% $.task1 %>
2. It works fine with input, e.g.: mistral execution-create wi.with_items '{"method": "GET", "queries": ["Alaska", "Mistral", "OpenStack"]}'
3. task task1 'SUCCESS': | task-id | task1 | wi.with_items | exec_id | SUCCESS |
4. Result contains 3 entities.