Theme: Automating processes in KNIME through HTTP requests.

I have built a small process implemented in a Java Snippet node. When I send a GET request to the local page with the parameter tuble=89, I receive it in the KNIME logs. For example: http://localhost:8080/updates?tuble=89

Now, I want the entire process in KNIME to update the subsequent chain of nodes whenever a new tuble is received, meaning that each time the logs print in the console.

Therefore, I want to create a process that listens on a port and localhost so that my process automatically triggers each time like a trigger.
WebServiceJetty.knwf (8.3 KB)


I take that the Java Snippet keeps running indefinitely so never reaches the β€œexecuted” stage (i.e. showing green traffic light)?

I think if that is the case that will be a problem because this will prevent any subsequent node from ever triggering.

One idea to explore:

  1. wrap your process in a loop (maybe even recursive that stops via flow variable, which won’t happen)
  2. whenever your endpoint receives tuble, you shut down your local server, pass the value to your table output port, initiate any follow up processes (still inside that loop). Maybe even use Call workflow service if it is something bigger
  3. the recursive loop then restarts your local server
    Obviously that means that there is some β€œdowntime” every time a request hits your endpoint, but I think that is as good as it gets if you want to go for this set up
1 Like

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