Skip to content

WorkflowOutputEvent does not propagate executor information #3040

@Yev4all

Description

@Yev4all

Use case: custom Workflow executor needs to report output information. Two approaches to submit output were tested:

event = WorkflowOutputEvent(source_executor_id=”executor_id”, data=response.text)

await ctx.add_event(event)

and

await ctx.yield_output(response.text[:50]+ "...")

Event information is retrieved by next code:

events = await workflow.run(user_message)

       print(f"{'=' * 60}\nWorkflow Events:")

       for event in events:

           print(f"{type(event).__name__}:

{getattr(event, 'executor_id', None)}:

{str(getattr(event, 'data', None))[:80]}...")

Printed result does not show executor name as seen below
WorkflowOutputEvent:None:

Other events like ExecutorInvokedEvent and ExecutorCompletedEvent show correct executor name.

Additionally, it would be nice to have executor information in events.get_outputs()

Please advise how to get executor information in output events.

Thank you
YK

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions