How would exec node be designed now?

Following on from discussions on the use of done() and node.error() it would help me in designing a node I am working on to consider the design of the Exec node, were it to be redesigned taking the new Complete feature into account. I am not suggesting it should be so redesigned as the backwards compatibility might well be an issue.
Currently it has three outputs.
O/P 1 sends out stdout text as a sequence of zero or more messages
O/P 2 sends out stderr text as a sequence of zero or more messages
O/P 3 sends the return code indicating error or fail when the action is complete.
In addition a Complete node attached to the exec node signals when the command is complete. If the node generates an error such as that from being asked to run a non-existent command then the Complete message includes the error code and text.
Slightly surprisingly an invalid command error is not picked up by a Catch node. Perhaps other errors are, I don't know.

So the question is, if one were starting from scratch with the exec node and compatibility were not an issue then what would the design be now? I have some ideas but don't want to prejudice the thoughts of others.

1 Like