~/tmp$ cat test-repeat.yaml
---
version: "2.0"
wf1_with_items:
type: direct
input:
- links
tasks:
task1:
with-items: link in $.links
action: std.mistral_http url={$.link}
publish:
result: $
~/tmp$ mistral workflow-create test-repeat.yaml
Starting new HTTP connection (1): localhost
+----------------+--------+-------+----------------------------+------------+
| Name | Tags | Input | Created at | Updated at |
+----------------+--------+-------+----------------------------+------------+
| wf1_with_items | <none> | links | 2015-02-02 01:08:14.986971 | None |
+----------------+--------+-------+----------------------------+------------+
~/tmp$ mistral execution-create wf1_with_items '{"links": ["https://raw.githubusercontent.com/stackforge/mistral/master/requirements.txt"]}'
Starting new HTTP connection (1): localhost
Remote error: InputException Wrong input format for: {'action_context': {'workflow_name': u'wf1_with_items', 'task_tags': None, 'task_id': u'82ce5e13-d0ec-44d4-9c30-e928655b9c93', 'execution_id': u'2c6ab75b-ef3a-4fa1-bedd-507e1ab4e85a', 'task_name': u'task1'}, u'link': [u'https://raw.githubusercontent.com/stackforge/mistral/master/requirements.txt']}. List type is expected for each value.
[u'Traceback (most recent call last):\n', u' File "/opt/openstack/mistral/.venv/local/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 137, in _dispatch_and_reply\n incoming.message))\n', u' File "/opt/openstack/mistral/.venv/local/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 180, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', u' File "/opt/openstack/mistral/.venv/local/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 126, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', u' File "/home/vagrant/code/openstack/mistral/mistral/engine1/rpc.py", line 81, in start_workflow\n **params\n', u' File "/home/vagrant/code/openstack/mistral/mistral/utils/__init__.py", line 94, in _logged\n return func(*args, **kw)\n', u' File "/home/vagrant/code/openstack/mistral/mistral/engine1/default_engine.py", line 76, in start_workflow\n self._run_remote_commands(cmds, exec_db, wf_handler)\n', u' File "/home/vagrant/code/openstack/mistral/mistral/engine1/default_engine.py", line 180, in _run_remote_commands\n if not cmd.run_remote(exec_db, wf_handler, cause_task_db):\n', u' File "/home/vagrant/code/openstack/mistral/mistral/engine1/commands.py", line 147, in run_remote\n self._run_task()\n', u' File "/home/vagrant/code/openstack/mistral/mistral/engine1/commands.py", line 162, in _run_task\n self._run_action()\n', u' File "/home/vagrant/code/openstack/mistral/mistral/engine1/commands.py", line 228, in _run_action\n action_input_collection = with_items.calc_input(action_input)\n', u' File "/home/vagrant/code/openstack/mistral/mistral/workflow/with_items.py", line 170, in calc_input\n validate_input(with_items_input)\n', u' File "/home/vagrant/code/openstack/mistral/mistral/workflow/with_items.py", line 193, in validate_input\n " expected for each value." % with_items_input\n', u"InputException: Wrong input format for: {'action_context': {'workflow_name': u'wf1_with_items', 'task_tags': None, 'task_id': u'82ce5e13-d0ec-44d4-9c30-e928655b9c93', 'execution_id': u'2c6ab75b-ef3a-4fa1-bedd-507e1ab4e85a', 'task_name': u'task1'}, u'link': [u'https://raw.githubusercontent.com/stackforge/mistral/master/requirements.txt']}. List type is expected for each value.\n"].
Fix proposed to branch: master /review. openstack. org/152139
Review: https:/