How to start a new (independent) workflow from within an activity #240
Unanswered
travisaustin
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You're right about it interfering. One option would be to dispatch a plain job and then inside that job you could start the new independent workflow. Another option which is roughly the same thing would be a queued event listener. Also the same approach would work for signaling a workflow as well. I'll think about how this could be made easier. Let me know if you have any thoughts as well. Thanks! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to create and start a new workflow within the activity of a different workflow. It seems that this can't work because
WorkflowStub::setContext()
is called anytime a workflow is created, and that messes up the context of the activity if it's called within an activity.For simplicity, let's say I have a workflow for performing a user's password reset. If they successfully reset their password, I want to dispatch a welcome email series before sending them the final password reset instructions. When the password is reset, I want the password reset workflow to be marked complete and the second workflow (the welcome email series) to be in progress.
Is there a supported method to start a separate (not child) workflow within an activity?
On top of that, is there a supported method to call a workflow
Signal
method from an activity within that workflow or within another workflow?Beta Was this translation helpful? Give feedback.
All reactions