Closed rcruicks closed 7 years ago
Then team are investigating will reply here.
@rcruicks So to clarify, the issue is that the document conversion node clears all the msg.xxx
properties and returns a msg object containing only the msg.payload
?
If we were to pass on the original msg object and simply change the msg.payload
then that would work for you?
@gibfahn hi Gibson - yes - from what I can see, all other Watson nodes take this approach, returning the Watson response in the payload of the original msg, or in a new msg property (msg.transcript, msg,speech, and the like) general node-red node behaviour is to pass on the original msg; this is often needed for things like http-in request flows, which need msg.req to be able to respond through http-response
Fixed in 0.4.29
most other nodes (have not checked all) take the approach of placing the Watson output in the payload of the incoming msg object - i.e. msg.payload = watson-response; node.send(msg);
Document conversion overwrites current msg by using - node.send({"payload": watson-response});
this obliterates the original URL in the payload, and any other msg properties (_id, url, topic, etc); makes it unnecessarily complicated to convert a document, and immediately store in cloudant or other repository, having set doc id and url to tag the doc in the database