Adding support for workflow context in condition callable #1820
droideronline
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
adding support for workflow context inside the condition callable that we pass while adding an edge.
One use case where this might be useful is when I want to keep track of how many times my condition function has run. For example, if it runs 5 times, I would return False in the condition. This count could potentially be stored in the workflow context as shared state.
However, I can’t think of many other use cases right now, and I believe this request would require quite a bit of design consideration, hence bringing this up here for discussion.
If there are better ways to store the count, please let me know. Using contextvar could also work.
Beta Was this translation helpful? Give feedback.
All reactions