-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Join ALL and conditional branches conflict? #216
Comments
Please could you give further details and an example that fails, and exactly what happened, so that this can be investigated? |
Here is the example:
input:
- task
- chat_id
- text
output:
- result: <% ctx() %>
vars:
- task1_txt: ''
- task2_txt: ''
- task3_txt: ''
tasks:
which:
action: core.noop
next:
- when: <% succeeded() and ctx().task = "task1" %>
do: task1
- when: <% succeeded() and ctx().task = "task2" %>
do: task2
- when: <% succeeded() and ctx().task = "task3" %>
do: task3
task1:
action: task1
input:
target: <% ctx(text) %>
next:
- do: task4
publish:
- task1_txt: <% result().result.txt %>
when: <% succeeded() %>
task2:
action: task2
input:
target: <% ctx(text) %>
next:
- do: task4
publish:
- task2_txt: <% result().result.txt %>
when: <% succeeded() %>
task3:
action: task3
input:
target: <% ctx(text) %>
next:
- do: task4
publish:
- task3_txt: <% result().result.txt %>
when: <% succeeded() %>
task4:
join: all
action: task4
input:
chat_id: <% ctx(chat_id) %>
text: <% ctx(task1_txt) %><% ctx(task2_txt) %><% ctx(task3_txt) %> %>
task4 did not execute.
Thank you.
…------------------ Original ------------------
From: "Amanda McGuinness";<notifications@github.com>;
Send time: Wednesday, Oct 21, 2020 2:54 PM
To: "StackStorm/orquesta"<orquesta@noreply.github.com>;
Cc: "鹿粑粑的粑是鹿粑粑的粑ˋ"<1393568913@qq.com>; "Author"<author@noreply.github.com>;
Subject: Re: [StackStorm/orquesta] Join ALL and conditional branches conflict? (#216)
Please could you give further details and an example that fails, and exactly what happened, so that this can be investigated?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
join is designed to join together branches that have run in parallel, in your example above you would never enter more than one of those branches, so there is nothing to join - and the join would in affect not be needed, and those branches could just have a next transition to take them to task4. (If you could reformat it would make it easier to see). In your real-life cases could multiple of your conditions be true, and so the paths run in parallel? And if they run in parallel, is the situation that not all of them would necessarily be run? |
Thank you very much. I have another question: |
Hi @JingxuanDinga That would be better asked in the StackStorm Forum. But if you mean execute from a StackStorm python-runner class then a similar thread on that question can be found here: |
That's what I want!! Thank you again!! |
I want to use conditions to determine which paths in the workflow to take, and finally use join all to summarize all the results that meet the criteria.
However, the final step did not execute .
The text was updated successfully, but these errors were encountered: