You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for an example of an interactive flow, where some tasks wait for user interaction via API calls.
Suppose a typical simplified user sign-up flow: a user signs up for an account. If the account does not exist yet for the given username/email, the system triggers the sign-up flow, as follows:
The first task sends an email to the user with a UUID token, retrying 3 times. If it fails, that's the end of the flow. If it succeeds, it moves to the next task.
The second task waits for the external event, the user confirmation. When the user clicks on the provided URL with the UUID token, this URL should send the event this task is awaiting. This task expires in 24 hours if not completed with success. Once finished with success, this task creates the user account in the system and moves to the next task.
This last task sends a welcome email to the user.
I know that it's very straightforward to implement tasks (1) and (3). I'm in doubt about how to implement task (2) efficiently. Is it possible to release system resources when the flow enters task (2)? I think the flow should be released from the memory while task (2) is awaiting for user confirmation.
Any help with an example for task (2) would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm looking for an example of an interactive flow, where some tasks wait for user interaction via API calls.
Suppose a typical simplified user sign-up flow: a user signs up for an account. If the account does not exist yet for the given username/email, the system triggers the sign-up flow, as follows:
I know that it's very straightforward to implement tasks (1) and (3). I'm in doubt about how to implement task (2) efficiently. Is it possible to release system resources when the flow enters task (2)? I think the flow should be released from the memory while task (2) is awaiting for user confirmation.
Any help with an example for task (2) would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions