can a workflow in knime ask user for input at the start of the execution of a workflow and with this info continu the workflow

Hey all,
I hope to start my workflow with a popup asking which xlsx-file and tab the workflow can use. On the interweb i see a lot of references to widgets yet if i place one such widget (file chooser, file upload, local file browser) and I press start it doesnt work; it complains that it needs input. Im hoping to give it input in a popup but yeah no popup…
I have the feeling im missing something very basic knowledge here yet i cant find a clue with google.
Does anybody knows how to start a workflow with a popup requesting to choose a xlsx?

Thanks in advance for your reply!

I think if you can share an example that illustrates on where you are currently stuck can be incredibly helpful to help us help you :-).

In general you are on the right path by using Widgets such as the File Upload widget, but of course just adding such a widget to a workflow will not mean that the workflow now processes the file… you will have to make further changes to your workflow downstream…

In general a lot is possible by leveraging composite views of components to achieve what it sounds like you want:

In the image above you can open the composite view by clicking on the option to the very right, this then makes the interactive view on the right appear which allows to select a file. Once a file is selected, the refresh button can be clicked and then the rest of the workflow can be triggered…

To get started this guide should be helpful:

https://docs.knime.com/latest/analytics_platform_components_guide/index.html#introduction

There’s also a dedicated playlist on Youtube that covers components:

I’ve also build an App that uses File Upload - you can access the workflow here to explore how it was implemented in the Calculate Version Component

2 Likes

Thanks Martin!

well i have just this

afbeelding

as understand it the node Local file browser generates a error instead of a popup. It could be that it needs input other than via a popup.
If so I need to think of an alternative. Probably an excel reader node with a good explanation next to it.

ok - I think the first thing to mention is that any configuration or widget node will never result in any “pop up” appearing on screen just when you click “execute”.

You have two alternatives to make things interactive:

  1. by using Configuration nodes and turning your workflow into a component. This then allows you to open the configuration menu of the component and e.g. select a file. When you then execute the component the file will be loaded from the data
  2. by using a widget - difference is that you can to specify the file in the configuration dialogue, but in the interactive view (as per my earlier post)

Here is how you can turn your example into a component:

  1. Open the config dialogue of your Local File Browser Configuration node, browse to any file as a default and take note of the Variable Name
  2. Open config dialogue of Excel Reader File, go to Flow Variable tab and under file selection choose the variable that gets created in the node under 1) to define path
  3. Select both nodes and click the “Create Component” Button to turn them into a Component:
    image
  4. Now you can open the Config dialogue of the component and choose any file. When you then execute the component the data gets loaded
  5. obviously you can built out any remaining logic inside the component
2 Likes

Thanks Martin, this really opens a new realm of Knime for me, great!

2 Likes

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