diff --git a/references/python/python.md b/references/python/python.md index 130b1eb..2c56843 100644 --- a/references/python/python.md +++ b/references/python/python.md @@ -98,6 +98,7 @@ if __name__ == "__main__": ### Workflow Definition - Use `@workflow.defn` decorator on class +- Put any state initialization logic in the `__init__` of your workflow class to guarantee that it happens before signals/updates arrive. If your state initialization logic requires the workflow parameters, then add the `@workflow.init` decorator and parameters to your `__init__`. - Use `@workflow.run` on the entry point method - Must be async (`async def`) - Use `@workflow.signal`, `@workflow.query`, `@workflow.update` for handlers