Small thing, but I find this confusing: run_flow_on_task(task, flow) Better would be: run_flow_on_task(flow, task)