Comment 1 for bug 1426258

Revision history for this message
Nikolay Makhotkin (nmakhotkin) wrote :

Please take a look at this test: https://github.com/stackforge/mistral/blob/master/mistral/tests/unit/engine1/test_with_items.py#L55-L75
here: https://github.com/stackforge/mistral/blob/master/mistral/tests/unit/engine1/test_with_items.py#L175-L201

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"
name: wi
workflows:
  with_items:
    type: direct
    input:
     - queries
     - method
    tasks:
      task1:
        with-items: q in <% $.queries %>
        action: std.http method=<% $.method %> url="http://google.com?q=<% $.q %>!"
        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.