Assign a value to a globally defined workflow variable

Dear All,

On a Knime server Version 4.4.1 I try to assign a value to a globally defined workflow variable using the &wv parameter in the URL (according the documentation here).

Of course, I have first set-up this variable in the workflow Variable panel (let's call it <variab>). But when I try to execute the workflow (URL ending with "&wv:variab=265") I get the following error message:

Some workflow variables (as per URL) are not defined: [variab]

Any idea what I am doing wrong ?

 

Thanks in advance for the help.

Best Regards,

Eric.

 

Hi Eric,

The content of the blog post you link to was created for KNIME Server 3.9, and is therefore a little outdated. The major point here is that we are slowly phasing out global workflow variables / workflow credentials. While you can still use them in older workflows without wrapped metanodes, workflow variables are not recognized anymore in WebPortal workflows that have wrapped metanodes.

The configuration of parameters should now only take place in quickform nodes. These can be configured via the WebPortal URL as well, just replace the "&wv" with "&pm". You could add for example a String Input quickform or an Integer Input to your workflow. In the configuration of these nodes, the name you chose for "Parameter name" will be the one you use in the WebPortal URL as well.

You can find the full list of supported URL parameters in the KNIME WebPortal User Guide, p. 19-20.

Cheers,

Roland

Hi @RolandBurger ,
This is a great update – thanks so much for communicating this to everyone.

It looks like a lot of KNIME documentation is out of date regarding this change (e.g. all the stuff I hit when I’m searching for workflow variables). Could someone from KNIME update these so that people don’t keep trying to use global workflow variables instead of the new ones?

Here’s the links to way old (and highly google ranked) docs:
https://www.knime.com/blog/urls-in-the-knime-webportal (this is usually the first google hit I find on this topic. It mentions the wv variable and has screen shots showing the ability to do this).
https://download.knime.com/server/4.6/KNIME_Webportal_User_Guide_4.6.pdf (page 17 of this most recent document shows a screenshot of the start page with global workflow variables, and the text clearly states that you can enter information on this start page before running the workflow)

Now that this has been obsoleted – what’s the replacement when you want to pass data into the workflow without asking users to fill it out? e.g. I have a parameter I want to run on a workflow, which will make it load from a particular row of the database, and then on the first screen the user will see the results. Did this update make that impossible, or is there a workaround?

Hi @YetAnotherKnimeUser,

We are currently working on a new documentation system, so the problem with outdated information can hopefully be avoided in the future!

As for your question, you would do this using quickform nodes, which you can configure via parameters that can be passed as part of the URL (&pm). Is that what you were referring to?

Cheers,
Roland

I just posted a question on the same thing, having found the same outdated page, so the update to the documentation (1 year since Eric’s question) is badly needed!

we currently use the workflow variables to execute server jobs where the workflow variable prompt on manual execution allows us to manually override default values for when the workflow runs scheduled.

With using quickform variables would this still be possible? That is, when executing the workflow job manually on the server it prompts for values, but when it runs as a schedule job it will not prompt and wait for manual intervention.

It would be a really serious degradation of capabilities if that’s the case, totally unworkable for us.

David

Hi David,

At the moment there isn’t a way to execute a workflow via the Execute menu in the Explorer without using workflow variables/credentials. They can be used in tandem to the Quickform variables/credentials (use the same name). We’re currently discussing how to implement the Explorer to have functionality similar to the existing functionality but without needing to use both workflow variables and quickform variables.

The new documentation is available here: https://docs.knime.com We’ve not made a major update to the WebPortal/Explorer docs just yet, but it should be easier to find the latest documentation, especially as the google indexing improves.

Best,

Jon

1 Like