Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Flows start_callback docs #140

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

markbackman
Copy link
Contributor


Start callbacks execute before a function is called, allowing you to:

- Provide immediate feedback while long-running operations complete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 3 bullet points sound kind of same-ish to me, like they're just paraphrasing (like I just did with this feedback whoops haha)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same feedback applies to where these bullets appear again

Copy link
Contributor Author

@markbackman markbackman Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

A function's behavior is determined by its properties:

- `handler` only: Process data, stay in current state
- `transition_to` (static flow) or `transition_callback` (dynamic flow) only: Pure transition to next state
- Both: Process data, then transition
- `start_callback` only or combined with others: Provide immediate feedback before execution
Copy link
Contributor

@kompfner kompfner Feb 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure you can provide start_callback by itself? Or does it need to piggyback on a provided handler? It kind of doesn't make much conceptual sense (to me) on its own...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it's possible but unlikely.

When there's no handler, it's likely an edge function and just transitioning, which shouldn't require a start_callback. But, it's possible 🤷.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just going to drop the only/combined part.

Copy link
Contributor

@filipi87 filipi87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants