I have question on stackstorm orquesta I have been working on. Since I cannot provide the original code here, I have provided a sample code that looks similar to my code.
Consider the task2 is supposed to do a REST API call to create a ticket in a platform.
When the task1 is failed, I want to the task2 (create ticket) to be executed and with that I want to execute the fail command also. The fail command is set to trigger an alert to another 3rd party software. The issue here is when I try to have both of these in the same ‘do’ attribute, task2 gets executed and the fail command gets executed twice. So I get same alert twice. And the orquesta shows as failed with the message “Execution failed. See result for details.” which I couldn’t see further details.
also Im using stackstorm version 3.8
version: 1.0
description: A basic workflow that runs an arbitrary linux command.
input:
- a: 0
- b: 0
- c: 0
- d: 0
tasks:
task1:
action: math.add
input:
operand1: <% ctx(a) %>
operand2: <% ctx(b) %>
next:
- when: <% succeeded() %>
publish:
- msg: task1 done
- ab: <% result() %>
do: task2
- when: <% failed() %>
publish:
- msg: task1 failed
- ab: <% result() %>
do: task2, fail
task2:
action: some action to create a bug ticket
If I run the task2 and fail separately, this issue is not happening. I also have tried executing task2 parallelly with another task (instead of fail command). And that also worked without any issue.
So, does this means we cannot use engine commands or specifically ‘fail’ command, parallelly with another task or command ?
I appreciate any input. thanks.