Execution pause inside component view

Hello Forum!
I’m currently developing a flow for an interactive visualization of some data based on user selections.

The selections have a hierarchical structure (i.e., the first selection filters the options for the second, etc.) and I want the possible values for a downstream selection to be updated on change of an earlier. The selections are handled by Nominal Row Filter Widgets with Re-execution on change activated, and the plot is then rendered based on these selections.

The issue I am having is that I want the selections and the plot to be in the same component view, but I don’t want to generate the plot before all selections are set to their desired values (and the user hits something like a Refresh/Plot button).
A stripped down version of the component would look something like this:

I attach a toy example of the flow below (using KNIME 4.7.7).
OBS: In real life the data ETL for the plot is quite time consuming, and having to wait for it to re-execute every time some selection is changed is not a good user experience.

Reexecute_halfway_in_component_view.knwf (18.7 KB)

Any help or tips on how to achieve this functionality would be greatly appreciated! Thanks in advance…

Hi @erik_lorentzen

Welcome to KNIME Forum. Did you considder the Wait node?

gr. Hans

Well, yes. But, as I understand it, the Wait node just pauses execution for a specified time. Right?

That’s right . It can also waits for a file to be created / modified or deleted. How about connecting your Empty Table Switch by a flow variable connection to the Refresh Widget and then to the Scatter Plot, see:
image

Yes, but it doesn’t solve the problem. It still executes the plot when the settings are changed (since the Nominal Row Filter Widgets re-executes everything after them at change).

Hi @erik_lorentzen and welcome to the KNIME Forum.

As a quick and easy solution you can simply put the filters in a component and remove the update button, as it will no longer be useful.

This way you will have an updated plot every time you modify the second filter. If you modify the first one, you will also have to modify the second one if you want the graph to be displayed.

I share the workflow in case it helps.
Reexecute_halfway_in_component_view_updated.knwf (89.4 KB)

Thanks also to @HansS for the suggestions.

Let me know if this was useful.

1 Like

Hey, thanks a lot Jose!
Unfortunately, it still doesn’t do what I want. Let me explain.

In your update to my toy example, if the user (e.g.,) selects “A” in the First filter, nothing is plotted until the user selects something in the Second, “a” say.
I’m with you so far.

But as soon that there is something in the Includes box of the Second widget, the plot is going to be re-executed at any change in any of the widgets. So if you add “B” to the First one with “a” still in the Second, the plot is re-executed.

In the actual application there are hundreds of possible options in each of multiple widgets. And the users will likely only be interested in a few of them, and are bound to use double-click to move some value from Excludes to Includes at some widget or other, and will then unintentionally freeze the application until the plot is drawn again.
And will be frustrated.

That is why I want (something like) a Refresh button to execute the plot only when the user is satisfied with the selections. I realize that I could put the plot in a different component, but I really think that would break the flow of the flow…

I genuinely appreciate your effort to try to help me, both of you!
Thanks again / Erik

Hi @erik_lorentzen,

Let’s see if the following solution is more helpful.

You can find the workflow here:
Reexecute_halfway_in_component_view_updated(2).knwf (95.3 KB)

Let me know if in this case it helps with exactly what you want.

Looking forward to your reply.

All the best,

Jose.

1 Like

Hello @josegallardo and thanks!

In the Reexecute_halfway_in_component_view_updated(2).knwf

After refreshing all nodes, the Component View starts out like this:
image

Including “A” in First, gives:

Including “a” in Second gives:

So far, so good!

But then the user realizes that “B” should also be in First, and includes it.

So adding “B” to the First widget draws the plot. Without pushing the Create/Refresh Plot button.

Actually, this is to be expected since the widgets re-execute downstream nodes on change.

What I would like is the Red and Blue part in the following screenshot to be executed independently, and that the Red part should be automatically re-executed on change within itself, and the Blue only when the button is pushed.

Thanks again! :slight_smile:
/ Erik

Hey guys!

I found a way actually. It’s not the most beautiful, but it works.

I added a Boolean Widget and IF Switch instead of the Refresh button.


And re-execution on change activated on all widgets.

The Component View will look like this:
image

And the Scatter Plot path will not be activated until the Plot! check box is selected.

The problem with the Refresh button is that it only passes a dummy flow-variable when pressed, and you can’t really act on the event. It would be nice in the future to have a Button-like widget, that is 0 by default and changes to 1 when pressed, or something like that.

Anyway, here is the flow if anyone is interested…
Reexecute_halfway_in_component_view_BooleanWidget.knwf (22.0 KB)

Thanks again for all your help!
/ Erik

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.