Call Local Workflow Node from "main" workflow

Hi all!

What I’m trying to do is to build “main” workflow in which I will call other workflows using Call Local Workflow Node so I have couple of questions and your ideas are welcomed :slight_smile:

  1. Is this ok approach or the is a better way to do it? Maybe using Metanodes?
  2. As Call Local Workflow Node needs input (and I actually don’t need it for now) what node is best to use to start a workflow? I used Timer Info.
  3. The same node when started shows progress but doesn’t show any other percentage besides 0%. That is normal?

Tnx in advance.

Br,
Ivan

Hi Ivan,

Since you do not have to specify any parameters for a called workflow, it might be easier to make everything in one workflow using meta nodes.

If you still would like to use a Call Local Workflow node not providing any parameters in JSON format, you can use a Table Creator or an Empty Table Creator nodes before the Call Local Workflow node.

You might also find helpful this page.

Best,
Anna

1 Like

What I do not fully understand about the call of local workflows is when they could be reset and when the results would be saved or the whole workflow would be saved. Sometimes I would like to start the workflow ‘fresh’ (reset), sometimes I would like to save the whole wortkflow. Is there any way to manage that=

Hi mlauber71,

The workflow you’re calling should be reset and saved before being called.

In order the called workflow to be able to accept parameters, make sure the called workflow has a JSON Input node with the default parameters (also make sure that the parameter names correspond exactly to the parameter names you will be passing when calling the workflow).

If you want the called workflow to be executed with the parameters you’re passing in your JSON input, you have to choose the appropriate JSON column in the Call Local Workflow node configuration dialog after clicking the “Load input format” button, otherwise you can choose the “default” option, in this case the workflow will be executed using the parameters you provided as default in the JSON Input node in the called workflow.

For an example please take a look at the knime://EXAMPLES/50_Applications/08_RESTDemo workflow at the EXAMPLES server.

I hope it helped, otherwise please try to clarify your question.

Best,
Anna

I would like to always reset the workflow at the start of a “call workflow”. The default procedure seems to be to execute the workflow and then save it so the next time it gets called it is already complete and will not run again. I wonder if there is a parameter I can pass along to force the workflow to reset most of its functions.

I will have a look at the example.

Hi Anna,

probably I will go with meta nodes. Tnx.

Br,
Ivan

Hi again!

I forgot to ask what is a Personal Productivity Licence that is needed?
What about percentage progress of Call Local Workflow node?

@mlauber71 If I’m not mistaken the default procedure is that workflow is not saved after execution.

Br,
Ivan

1 Like

Hi,

@mlauber71, @ipazin is correct, the status of the workflow will not be changed after calling, just reset and save the workflow before calling it once in the beginning.

@ipazin, the post is quite old, currently you don’t need any license for using the Call Local Workflow and Call Remote Workflow nodes. Percentage progress indicates the progress of the execution of the called workflow.

Best,
Anna

Hi Anna!

I know that :smiley:

My observation was that it is only showing 0% and my question was is it a bug or not?

Br,
Ivan

Hi ipazin,

Do you mean that the node would get stuck at 0% and is never executed?

Best,
Anna

Yes :slight_smile:

Can you attach both calling and called workflows?

Sure.
Tomorrow :slight_smile:
Ivan

Hi ipazin,

I think that you decision should be based on the scalability and separation of concerns, if you are planning to keep adding more and more functionality to your WF I would suggest to use the Call Local Workflow node.

However, let me share my experience on that: it works perfectly when you are in the Analytics Platform IDE (Eclipse) but the behavior is completely different when working headless (batch mode), it usually hangs and it’s not reliable at all.

Good news is that you could implement your own Call Local Workflow by using the API exposed in the package org.knime.core.node.workflow, there you will find all the required classes to execute WF from your code.

Hope it helps!

1 Like

Hi isoubelet!

Tnx for your advice and experience. Sure it helps. Is it complex to implement your own Call Local Workflow. It sounds inetersting…

@amartin Unfortunately I can not attach workflows as the have connections to DBs… Calling workflows mainly consist from connecting to database, transforming data and then transferring data to another database. Hope it help in troubleshooting.

Br,
Ivan

ipazin, it is not difficult as long as you are familiarized with KNIME’s node development.

Take a look at this article https://www.knime.com/developer/example/extension-wizard. Once you feel comfortable with node development, explore the classes contained in org.knime.core.node.workflow, they are, as well as their methods, self-explanatory so you’ll figure out how to load and run a WF.

:slight_smile:

Thank you :slight_smile:
Ivan

5 posts were split to a new topic: Execute and export multiple workflows from a wrapper workflow