Capture Workflow Start / End - Explain

Hello everyone,

I would like some help understanding how the “Capture Workflow Start / End” nodes work. The purpose is only for studying.

About those nodes, I decided to do a practical simple test, but I couldn’t execute it successfully.

From what I understand, the purpose of these nodes is to reduce repetition in workflow creation by reusing part of an already created workflow within another workflow. Alternatively, they can be used with a new database file (a file with new data).

Starting my analysis

I found this workflow on the KNIME Hub, and through my analysis, I was able to understand how it works. However, when I tried to apply it more practically, I couldn’t execute it.

Analyzing the workflow

In print1, I see across two groups of Start and End Workflow nodes. These two groups were combined using the “Workflow Combiner” and then saved locally in the specified path.

Combiner and Writer

saved workflow
image

Later, the “Workflow Reader” node was used to read the saved workflow, and then the “Workflow Executor” was used to execute it.

Reading Workflow structure
image

I noticed something interesting: the “Workflow Executor” above…
Automatically creates a new port for tables when it detects this type of output in the locally saved workflow.
Naturally, the “Workflow Executor” does not have the option to manually create ports, but when connected, it displays the port.

The “Workflow Executor”, does not have option to create ports, but when connected, creates the ports bases on output (it knows everything :slight_smile: )
image

With this in mind, I decided to conduct a test, and this is where I failed.


Explanation of my process

Step 1

I created a table with two columns:

  • One column with category values (A, B, C)
  • Another column with numerical values

Step 2

I initiated a Workflow Start.

Step 3

I added a Row Filter and filtered only values in category “A”.

Step 4

I ended with Workflow End.

Step 5

I saved the workflow locally (just like in the KNIME Hub example).

name of file
image

Saved locally

Step 6

I initiated a Workflow Reader and linked it to the saved file.

image

Step 7

I connected it to the Workflow Executor.

image


The issue

At this point, I noticed that the “Workflow Executor” did not create the table port.

My question is: Why didn’t this happen?


My objective and expected outcome (in my mind)

My assumption was that I could connect a new table (which is essentially the same table created initially). When executing the Workflow Executor, the result would be the “Row Filter” node applied to category “A”. In other words, I expected it to work like a “component,” but in the form of a Workflow Start / End.


Questions for better understanding:

  1. Why didn’t my Workflow Writer > Workflow Reader > Workflow Executor create the table port?
  2. Am I misunderstanding this process?
  3. Am I using Workflow Start / End incorrectly or in the wrong structural position?
  4. Is there a simpler example I could use to better understand this concept?

My understanding of “Capture Workflow Start / End”

They remind me a lot of components. A well-structured component, created with no risk of breaking, serves the purpose of streamlining certain routines—accelerating a process that took time to develop and solving a problem efficiently. Once connected to a new or initial database, it handles the processing automatically.

The “Capture Workflow Start / End” nodes work similarly. If you took time to create a solution within a workflow and would like to reuse part of it in another workflow while ensuring it adheres to specific rules to prevent errors, these nodes allow for that. Or not?

Hi @Felipereis50,

what a wonderful description! That was very helpful to understand the problem.

I created a simular workflow here and it worked:

But, it was a bit tricky to get the executor run.
Settings for the workflow writer:

Then I needed to check “remove input and output” nodes in the Workflow-Reader settings

After that the Data Input appeared in the Workflow Executor.

Instead of this Read/Write Workflow Construct I use the “Workflow Service” option. Therefor you have just to switch the output-settings of the Writer Node to

And call the workflow as as service:
image

It’s much cleaner and easier and in addition if you want to deploy the workflow one in the future to a KNIME hub it much more convinient.

You can find my workflow here:

3 Likes

@ActionAndi

Hello,

First of all, I apologize for the delayed response. This week has been very busy for me.

I performed the test as you explained, and it worked.
In the end, the issue was just a configuration setting in the “Workflow Writer” and a small adjustment in the “Workflow Reader.”

  • In the “Workflow Writer,” it is necessary to configure it so that the input or output connector appears in the “Workflow Executor.”
  • In the “Workflow Reader,” the “Remove input and output nodes” option must be checked.

The expected result was the filter being executed successfully.

Summary:
I found this functionality interesting.

Thank you for your help with the configurations.

Workflow Writer

Workflow Reader

1 Like

Yes this seems to be the case and is slightly counter intuitive.

2 Likes

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