Orquesta: regarding items and getting that item value in the next task by publishing

(Peter Michael Gits) #1

Couple of questions regarding iterations…

  1. trying to carry the element item to the next task: need syntax help
  2. iterating… when doing this, it should be in sequence task1 item0, task2 item0, task1 item1, task2 item2… am I missing some critical thinking here?
example below:

version: 1.0

    description: A workflow demonstrating with items.
      - members
      - my_message: "empty"

        with: <% ctx(members) %>
        action: core.noop
          - when:  <% succeeded() %>
            - my_message: <% item() %> 
            do: task2

        action: examples.echo message="<% ctx().my_message %>, resistance is futile!"
        #action: examples.echo message="<% item() %>, resistance is futile!"

      - items: <% task(task1).result.items.select($.result.stdout) %>


Peter M. Gits

(Lindsay Hill) #2

If you want to kick off a sequence of tasks for each item, call a separate workflow.

Otherwise it is going to run task1 with each item, then move to task2. Task 2 has no associated items.

(Peter Michael Gits) #3

Cool. Thanks. I will give it a try. I assume that the action is the workflow that does this. That is excellent. I think this is what I was indicating when I was discussing nested workflows but didn’t know how to ask it.


(Peter Michael Gits) #4

How do I keep it serialized? when iterating it appears that each one will get kicked off individually at the same time call their individual series, but then all series are kicked off at the same time. Do I use concurrent=1 to limit this to a single thread?

Thanks in advance,


(Peter Michael Gits) #5

Yes, that was the answer. Thanks for the assist. Working like a champ. Loving it.