# How would exec node be designed now?

**URL:** <https://discourse.nodered.org/t/how-would-exec-node-be-designed-now/29020>\
**Category:** Developing Nodes\
**Created:** [26 June 2020 09:22 UTC](https://discourse.nodered.org/t/how-would-exec-node-be-designed-now/29020 "2020-06-26T09:22:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 June 2020 09:22 UTC](https://discourse.nodered.org/t/how-would-exec-node-be-designed-now/29020/1 "2020-06-26T09:22:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 August 2020 09:22 UTC](https://discourse.nodered.org/t/how-would-exec-node-be-designed-now/29020/2 "2020-08-25T09:22:39Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
