Call remote workflow and terminate workflow

Hello everyone,

i have a workflow on my KNIME server, which requires some user input. At the end of the workflow a have a “Call Remote Workflow (Row based)”-Node. This Node calls another workflow, also stored on the server, which performs some calculations based on the user input and sends an email to the user, when the workflow has finished. Everything works fine, but since the calculations take some time, i would like to present the user the “Workflow executed sucessfully-screen” from the first workflow and give them a notfication via email, when the second workflow has finished. This is not possible since the “Call Remote Workflow -Node” is still running and i only get the “Workflow executed sucessfully -screen” when both workflows have finished.

Is there a way or a workaround I can terminate the first workflow, while the second one, i have called by the "Call Remote Workflow -Node, is still executing?

Best Regards
Marty

Hi @maaartyN,

To achieve this, I suggest you use a POST Request node to directly call the workflow via REST API, rather than going through the Call Remote node.

When executing via API, you can add the query parameter ?async=true, so that the called workflow sends a response immediately instead of waiting until it has finished.

Cheers,
Roland

1 Like

Hello Roland,
Thanks for the hint.
I tried this just like in this example:

Unfortunately I get in my workflow as output of the post-request-node a status code 500 and the second workflow does not start with the execution. The status code indicates a server-side error, but with the Call Workflow (Remote)-Node it works without problems.
Do you have an idea why this problem occurs?

Best Regards
Marty

Ok the first workflow executes sucessfully and second workflow starts, but something fails during the execution and unfortunately, the job disappears in the workflow explorer, so i can not investigate which part of the second workflow fails.

Nevertheless that helped me a lot, thanks : )

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