Node Lifecycle

I am hoping to better understand the lifecycle of node processing. For example, when is the NodeModel’s

protected DataTableSpec[] configure(final DataTableSpec[] inSpecs) throws InvalidSettingsException;

method called? Is it only when the NodeDialog settings change, or is it executed every time the NodeModel’s

protected BufferedDataTable[] execute(final BufferedDataTable[] inData, final ExecutionContext exec) throws Exception;

is called? I gather from digging through source documentation that in the answer to this particular questions depends on the return of NodeModel’s

protected boolean resetAndConfigureLoopBody();

method. Is there a single document which describes the execution lifecycle though? Thanks!

Hi @bfrutchey,
the configure method is used to determine the output the node will produce when execute is called. This description of the output, e.g. the table spec if the output port is a data table, is then passed on to the following nodes. They in turn execute their configure method to pass on their output again. So any time the output might change, configure is called. Concretely, that is when the settings of the node change or when an upstream node’s settings changed, when a new connection into the node is made, or when the node is reset. I think the resetAndConfigureLoopBody method is used only by loops to reset all the nodes in the loop, as that is what happens before every iteration.
Kind regards