Allow user to select which workflow to run

I want to create a metanode that allows the user to select which workflow to execute.
So if the user selects path1 it will run path1, same if it selects path2, and also have the possibility of selecting both at the same time.

I was trying to use a multiple selections node followed by a switch, but honestly, I didn’t manage to make it run.
Any advice will be welcomed, thank you.

Hi @RoyBatty279

Your question is very similar to one posted recently and for which I provided the following possible solution:

Basically, one can store in a table a list of possible workflows to execute and then execute the one the user has chosen based on a -single selection widget- node. In the snapshot example above, the -single selection widget- node would replace the -row filter- node to allow the user to decide which local workflow to execute.

Hope it helps. Otherwise please reach out again if further help is needed.

Best
Ael

Hello again @aworker

First, thank you very much for your help.
Indeed that seems like a more dynamic solution.
However, I believe in my case it would be simpler to just use a case switch with a flow variable selection. Plus honestly, I’m not sure how to implement your method inside a metanode configuration.

Here I attach a very simple workflow where you have a table with an integer column, to which you want to perform three different types of operations based on users selection. The problem is that for three variable selection I need to use a multiple selections, but I don’t know how to add it as a flow variable to the switch node.

KNIME_project.knwf (13.9 KB)

Hi @RoyBatty279

My pleasure :smiling_face:

I understand better now. By the way, KNIME version 4.5.2 allows a variable number of cases in a -CASE switch start- node which enormously facilitates the task :wink:

Please find below a possible solution to your question:

And the workflow with the solution:

20220524 Pikairos Allow user to select which workflow to run.knwf (42.3 KB)

Hope it helps. Otherwise please reach out again for further help.

Best
Ael

EDIT: Workflow has been updated since 1st upload. Please download last version.

2 Likes