Skip to content
Community forum

run_workflow() in the Python SDK returns None

SolvedSupero SupportSupero team asked

Common question, written up by the Supero team.

python
from supero import ServiceLib
sl = ServiceLib.from_env()
result = sl.run_workflow("order_confirmed", order_uuid=order.uuid)
print(result)  # None

No exception is raised.

Link

1 answer

Accepted answer
Accepted answer

run_workflow() never raises. It returns the parsed {success, output, ...} envelope, or None on a transport or auth failure, meaning the call didn't get through. ServiceLib.from_env() takes its connection details from SUPERO_URL, SUPERO_API_KEY and SUPERO_DOMAIN, so check that all three are set in the process that runs this code and that the key is valid.

A call that reaches the engine but can't run looks different. A workflow in Draft, Disabled or Archived, or with enabled: false, comes back as an envelope with a failed result that says why. So with None, start with the connection and the key; with a failed envelope, start with the workflow.

Keyword arguments become the workflow's input object, so order_uuid=... is {{input.order_uuid}} inside the steps.

Supero Integrations teamSupero team answered
Link

Your answer

run_workflow() in the Python SDK returns None | Supero Community