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.
Currently the handler takes the array of Items returned by process and puts them in
featuresfield 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
processdefinition, whereas the input could be any JSON at all as long as it has aprocessdefinition and optionally anid.Construct a new ItemCollection output to return, populating with the output from the
Task.processinto thefeaturesfield and copying over the process definition.