This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

⚠️ We've moved!

Hi there!

To reduce project dependency on 3rd party paid services the StackStorm TSC has decided to move the Q/A from this forum to Github Discussions. This will make user experience better integrated with the native Github flow, as well as the questions closer to the community where they can provide answers.

Use 🔗 Github Discussions to ask your questions.

Proper fail for orchesta

I have been using action-chains for years. My normal python code for my actions is either
return True
return False

In orquesta transitions I specify
when: <% failed() %>
do: someaction

This has not been working for some actions… any ideas why?? SHould I be using exit(1) instead?

If your action is a python-runner Action Runners — StackStorm 3.4.0 documentation it might help returning a tuple to express execution success/failure rather than just true/false.

So, like

return True, “some result string or json”
return False, “error from exception”
?

IF so, this is what I am currently doing and sometimes the False isn’t getting caught. I read deeper into this and I think maybe instead of False, we might move to raise an exception instead. Will mess around, appreciate the response.

You should return a tuple:
return (False, "Error from exception")
as same as

sys.exit(1)

raise exception

You can find more information at:
https://docs.stackstorm.com/actions.html#writing-custom-python-actions