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

Make Assembly components configurable #10

Open
bergie opened this issue Sep 15, 2020 · 1 comment
Open

Make Assembly components configurable #10

bergie opened this issue Sep 15, 2020 · 1 comment

Comments

@bergie
Copy link
Member

bergie commented Sep 15, 2020

Right now it is not really possible to parametrize the inputs received by an Assembly component, except by implementing a separate component to manipulate the message before it is passed to the Assembly component.

One idea I've been toying with would be:

  • Add a control port for components that have validators
  • The control port would accept an object that is used together with the message when the component fires
  • The control object can provide static values, and also map things from the input message to the data structure expected by the component (for example using JSONPath)

This would make Assembly components quite a lot more reusable.

@trustmaster
Copy link
Member

Technically, Assembly components are just normal NoFlo components. Assembly simplifies implementation of certain patterns and component types, but doesn't enforce them. Which means that any kind of components can be used within the same graph.

Hence, I don't think that this parametrization feature should be added to every component. But rather, it can be implemented as a set of traits that one can add to certain components if needed.

  • Adding static values to a message object can be done by an explicit component. Similar to noflo-objects/SetProperty(Value), but supporting nesting
  • Changing the structure of a message object also sounds like a job for another component, which could use JSONPath to do the transformations.

But maybe i'm missing something. It would be nice to look at specific examplest to see if parametrization is more convenient than using transformer components.

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

No branches or pull requests

2 participants