The final node implementation is trickier than you might think. The big thing, actually, is deciding when the final node should actually be run. If all of the "normal" nodes finish successfully, it's pretty easy. But if that's not the case, it's harder.

Also, when you're going to run the final node, the DAG is in kind of a weird state -- it's not fully completed, but no "normal" nodes should run, either. A result of this is that there are a lot of methods in the Dag object that have a flag for whether a final node (if one exists) should be considered or not.

(More info needed here...)