
What Temporal Can't Do: Human Approval Mid-Workflow
Temporal is excellent at durable execution. I'm not here to argue otherwise. But try adding a human approval step to a Temporal workflow. Something like: agent validates a database migration, then an SRE needs to approve before it runs. What This Looks Like in Temporal @workflow.defn class ApprovalWorkflow: def __init__(self): self.approved = None @workflow.run async def run(self, change): result = await workflow.execute_activity( validate_change, change, start_to_close_timeout=timedelta(minutes=5) ) # Wait for human signal await workflow.wait_condition( lambda: self.approved is not None ) if not self.approved: return {"status": "rejected"} return await workflow.execute_activity( apply_change, change, start_to_close_timeout=timedelta(minutes=10) ) @workflow.signal async def approval_signal(self, approved: bool): self.approved = approved This is the workflow. Now you need: A notification service - Temporal doesn't notify humans. You build email/Slack integration. A UI or API for the hum
Continue reading on Dev.to Python
Opens in a new tab



