← Lesson
Sequential Is the Default
Joeven
Run
Reset
Python loads on first run
PIPELINE = ["intake", "policy", "hitl", "apply"] def run_pipeline(ticket, skip_hitl=False): steps = list(PIPELINE) if skip_hitl: return {"error": "skip_hitl_not_allowed", "steps": steps} path = [] state = {"ticket": ticket} for name in steps: path.append(name) if name == "intake": state["cat"] = "billing" elif name == "policy": state["ok"] = True elif name == "hitl": state["approved"] = True elif name == "apply": state["done"] = state.get("approved") is True return {"path": path, "done": state.get("done")} print(run_pipeline("refund 99")) print(run_pipeline("refund 99", skip_hitl=True))
Run to execute this in your browser. Nothing is sent to a server.