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

[Question/Suggestion] Pass data of an output channel to the next one #486

Closed
alexej-d opened this issue Oct 24, 2024 · 4 comments
Closed
Milestone

Comments

@alexej-d
Copy link

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no

I was wondering if it is possible to pass some of an output channel's returned data to the next channel in the same workflow?

Imagine you have a custom output channel that creates a PDF and you want to pass the URL of the PDF to the Email channel.

How would you do that? Maybe via a global service that stores the current lifecycle's context variables?

@alexej-d
Copy link
Author

Any recommendations @solverat ?

@solverat
Copy link
Member

solverat commented Jan 9, 2025

Hey @alexej-d Sorry for the late response, but I need(ed) some time to think about this.

tl;dr: No. Currently, there is no way to fetch data between the channel processes.

We have an internal signal listener/workflow, which is not dispatching after every channel process. It's also not meant to store dynamic data.

However, I just pushed something here:

#504

This will introduce a new object called ChannelContext. It's available in the whole workflow lifecycle and can be retrieved in every ChannelSubjectGuardEvent event or within your custom channel, if you're implementing the ChannelContextAwareInterface interface.

With this, you should be able to pass the PDF to every upcoming channel.

@alexej-d
Copy link
Author

Thank you @solverat! Will play with the new addition ASAP!

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

No branches or pull requests

2 participants