draw_all_possible_flows doesn't work for non-decorated workflow functions #20

Closed
opened 2026-02-16 02:16:08 -05:00 by yindo · 2 comments
Owner

Originally created by @Patco96 on GitHub (Oct 24, 2025).

Description

The draw_all_possible_flows() method does not work when using the non-decorated workflow approach (where workflow functions are passed directly to the Workflow constructor instead of using the @step decorator).

To Reproduce

Using a workflow defined with the non-decorated approach from the docs, with draw_all_possible_flows:


async def main():
    w = joke_flow(timeout=60, verbose=True)
    draw_all_possible_flows(w, filename="joke_flow_all.html")
    res = await w.run(topic="pirates")
    print(res)

Expected behaviour

draw_all_possible_flows() should generate a visualization of the workflow with all the steps.

Actual behaviour

No steps are shown.
Image

Originally created by @Patco96 on GitHub (Oct 24, 2025). ## Description The `draw_all_possible_flows()` method does not work when using the non-decorated workflow approach (where workflow functions are passed directly to the Workflow constructor instead of using the `@step` decorator). ## To Reproduce Using a workflow defined with the [non-decorated approach from the docs](https://developers.llamaindex.ai/python/workflows/#decorating-non-class-functions), with `draw_all_possible_flows`: ```python async def main(): w = joke_flow(timeout=60, verbose=True) draw_all_possible_flows(w, filename="joke_flow_all.html") res = await w.run(topic="pirates") print(res) ``` ### Expected behaviour draw_all_possible_flows() should generate a visualization of the workflow with all the steps. ### Actual behaviour No steps are shown. <img width="373" height="535" alt="Image" src="https://github.com/user-attachments/assets/6e22978d-51ca-4bd3-a48f-b37529cc1276" />
yindo added the bug label 2026-02-16 02:16:08 -05:00
yindo closed this issue 2026-02-16 02:16:08 -05:00
Author
Owner

@adrianlyjak commented on GitHub (Nov 3, 2025):

@Patco96 I think I actually incidentally fixed this in v0.5.0 of llama-index-utils-workflow, released last Wed--I noticed that it was pulling the step definitions from the class rather than the instance.

Appreciated if you could re-test 🙏

@adrianlyjak commented on GitHub (Nov 3, 2025): @Patco96 I think I actually incidentally fixed this in v0.5.0 of llama-index-utils-workflow, released last Wed--I noticed that it was pulling the step definitions from the class rather than the instance. Appreciated if you could re-test 🙏
Author
Owner

@Patco96 commented on GitHub (Nov 5, 2025):

Re tests and it works now! Thanks

@Patco96 commented on GitHub (Nov 5, 2025): Re tests and it works now! Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-py#20