@@ -23,25 +23,28 @@ class TodoExecuteResponse(BaseModel):
2323@workflow .defn ()
2424class TodoExecute :
2525 @workflow .run
26- async def run (self , params : TodoExecuteParams ) -> TodoExecuteResponse :
26+ async def run (self , workflow_input : TodoExecuteParams ) -> TodoExecuteResponse :
2727 log .info ("TodoExecuteWorkflow started" )
2828 random = await workflow .step (
29- get_random ,
30- function_input = RandomParams (todo_title = params .todo_title ),
29+ function = get_random ,
30+ function_input = RandomParams (todo_title = workflow_input .todo_title ),
3131 start_to_close_timeout = timedelta (seconds = 120 ),
3232 )
3333
3434 await workflow .sleep (2 )
3535
3636 result = await workflow .step (
37- get_result ,
38- function_input = ResultParams (todo_title = params .todo_title , todo_id = params .todo_id ),
37+ function = get_result ,
38+ function_input = ResultParams (
39+ todo_title = workflow_input .todo_title ,
40+ todo_id = workflow_input .todo_id ,
41+ ),
3942 start_to_close_timeout = timedelta (seconds = 120 ),
4043 )
4144
4245 todo_details = TodoExecuteResponse (
43- todo_id = params .todo_id ,
44- todo_title = params .todo_title ,
46+ todo_id = workflow_input .todo_id ,
47+ todo_title = workflow_input .todo_title ,
4548 details = random ,
4649 status = result .status ,
4750 )
0 commit comments