Triggering workflows through events #834
Unanswered
aswanthkrishna
asked this question in
Q&A
Replies: 1 comment
-
Hey @aswanthkrishna, when you define your workflows, you have to make it listen to the event and then You can trigger the workflow based on the event. sample workflow code: from hatchet_sdk import Hatchet
hatchet = Hatchet()
@hatchet.workflow(on_events=["user:create"])
class MyWorkflow:
@hatchet.step()
def step1(self, context):
print("executed step1")
pass
@hatchet.step(parents=["step1"])
def step2(self, context):
print("executed step2")
pass Check the documentation - https://docs.hatchet.run/sdks/python-sdk/run-workflow-events |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I just started exploring hatchet and looks very promising for my use case .
From a quick browse through the examples I have seen setting up workflows and manually triggering them.
I was wondering if it is possible to have multiple workflows listen to an event and programmatically create events from the sdk.
Beta Was this translation helpful? Give feedback.
All reactions