from supero import ServiceLib
sl = ServiceLib.from_env()
result = sl.run_workflow("order_confirmed", order_uuid=order.uuid)
print(result) # NoneNo exception is raised.
run_workflow() in the Python SDK returns NoneCommon question, written up by the Supero team.
from supero import ServiceLib
sl = ServiceLib.from_env()
result = sl.run_workflow("order_confirmed", order_uuid=order.uuid)
print(result) # NoneNo exception is raised.
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.
Know the answer? Sign in to post it. It takes an email address and a 6-digit code.
Sign in to answer