While trying to setup a workflow to run on our server (Linux, KNIME server v 4.9.2) I stumbled upon a problem. The same workflow executed on the Analytics Platform (Windows 10) and on the Server behaves differently.
Here is a simplified version of the workflow: Flow Variable Issue.knwf (17.6 KB)
The workflow contains a String Input which generates a flow variable testInput with default value Foo. Then this variable is sent to a component. In the component I have a String Configuration node generating a flow variable testConfiguration, with a default value Bar. In the Flow Variables tab, I set up the defaultValue > string to use the testInput variable value. So I should end up with testConfiguration having the value Foo instead of the default Bar. To retrieve the result, I simply pipe this node to send back the result as a JSON.
In the Analytics platform, this work as expected and I retrieve the expected value Foo:
[
{
"value": "Foo"
}
]
However, when I upload the workflow to the server and execute it, the testInput variable value is not passed to the Component, and I end up with the value Bar instead:
Hi,
this is strange, but before we investigate further, can you try it a bit differently? Instead of setting the default value of the String Configuration in the component to the incoming flow variable, you can also assign the outer flow variable to the inner configuration’s value via the flow variable tab in the component’s config dialog. This is the recommended way as the default value is overwritten if something comes in via the component’s configuration dialog.
Kind regards,
Alexander
Thanks for your quick response. I hadn’t thought of doing it that way, and indeed it makes more sense.
However even using the Component’s dialog to set the flow variable I have the same result. The output is Foo on my computer but Bar on the server.
Hi,
I just tried your workflow on my 4.10 Server and at least there the problem is not present. I get “Foo” out of the component just as expected. I’ll see if I find a 4.9 installation to try it out there.
Kind regards,
Alexander
Hi,
I just wanted to let you know that I also tried it on 4.9 and could reproduce the issue there. But on 4.10 it works fine, so if you can upgrade this issue could be resolved.
Kind regards,
Alexander