Invoking a service when an event occurs #4817
Answered
by
davidkpiano
imeghri-sami
asked this question in
Q&A
-
Is there a method to trigger services when an event occurs? From my understanding of the docs, services (actors in v5) are used to run side effects functions or essentially handle actions and their results confined within the context of a state. I want to call a service during a transition in response to an event, without introducing a new state and returning to the previous state, or creating a new actor machine only to execute the service.
|
Beta Was this translation helpful? Give feedback.
Answered by
davidkpiano
Mar 26, 2024
Replies: 1 comment
-
You can spawn actors instead of invoking them based on an event. 📖 Docs: https://stately.ai/docs/spawn |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
imeghri-sami
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can spawn actors instead of invoking them based on an event.
📖 Docs: https://stately.ai/docs/spawn