I’ve started elaborating nested workflows so I’ve introduced some Call Workflow, Container Input and Container Output Nodes to my workflows.
As many times before I’ve quickly run into some silly troubles. One of my workflows has started to behave strangely. I identified the problem and isolated surprising fact.
If I configure a Date&Time Input node to produce its value based on execution time it works as expected just until the time the workflow is configured as an inner workflow of another one.
Let’s simulate it together step by step.
Let’s create an Inner Workflow first. The workflow consists of three nodes as follows:
The Empty Table Creator creates a table of one row. The Constant Value Column node appends an output of Date&Time Input node to the table. Let’s have a look at how the Date&Time Input node is configured.
Note, the “Use execution time” is checked. Pay a special attention to the grayed date and time values that are set to some time yesterday. I guess it might be the time I started KNIME IDE last time but I’m not sure. It’s definitely not a time I created the workflow not even time I added the node to it.
OK, let’s carry on. Once invoked the workflow produces an output I’d expect.
14:01:57 was really the time of execution.
Next I added a pair of Container Input / Output nodes, reset and re-invoked the workflow. The behaviour of the Date&Time Node didn’t change.
After that I introduced an outer workflow which was supposed to call the inner one. I added three nodes and configured the Call Workflow (Table Based) one to use the workflow I created before.
Just after this I noticed this action reseted some nodes of the inner workflow. Those were the Container Input and Date&Time Input and their ancestors. Let’s have a look:
And now let’s have a look at what happened to the Date&Time Input.
Wow! The configuration dialog insists on that the value was ovewritten by a dialog. The time it displays just behind the message is the time the configuration dialog was opened. It refreshes when the dialog re-opens. Nevermind.
And now let’s execute the Date&Time Node. It produces the time we could see in grayed fields of configuration form. The time I consider to be the current time at the moment KNIME IDE started.
I don’t think this is really an intention.
Even more interesting thing is, the impact on the Date&Time Input is ireversible. Even after I step-by-step reset the workflow, removed Container Input and Output nodes, removed the Call Workflow node from the outer workflow and even removed the whole outer workflow, I couldn’t make it produce execution time anymore.
I’m fully convinced this is a bug. The only workaround I could come up with at the moment would be a replacement of Date&Time Iput nodes with a custom logic implemented in suitable snippet nodes (a Java Snippet node for instance).
Knime Analytics Platform 3.7.1, MacOS Mojave