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

Construct new output in handler #5

Open
matthewhanson opened this issue Oct 24, 2022 · 0 comments
Open

Construct new output in handler #5

matthewhanson opened this issue Oct 24, 2022 · 0 comments

Comments

@matthewhanson
Copy link
Member

Currently the handler takes the array of Items returned by process and puts them in features field of the input payload, and returns it.

This means the output payload will have any additional fields from the input payload which may not be what is intended. The output of a Task should be a valid ItemCollection with an 'id' and process definition, whereas the input could be any JSON at all as long as it has a process definition and optionally an id.

Construct a new ItemCollection output to return, populating with the output from the Task.process into the features field and copying over the process definition.

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

1 participant