# Call a workflow and get the output as input for the main workflow

**URL:** <https://forum.knime.com/t/call-a-workflow-and-get-the-output-as-input-for-the-main-workflow/60530>\
**Category:** KNIME Analytics Platform\
**Tags:** knime-ap\
**Created:** [January 27, 2023, 2:54pm UTC](https://forum.knime.com/t/call-a-workflow-and-get-the-output-as-input-for-the-main-workflow/60530 "2023-01-27T14:54:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fra\_S3k\_knime](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/f/958977/32.png) [@Fra\_S3k\_knime](https://forum.knime.com/u/Fra_S3k_knime)\
**Post date:** [January 27, 2023, 2:54pm UTC](https://forum.knime.com/t/call-a-workflow-and-get-the-output-as-input-for-the-main-workflow/60530/1 "2023-01-27T14:54:37Z")

</div>

Hello there,

I am struggling a lot with the Call Workflows nodes. Maybe I didn’t understand yet the deep spirit of these nodes but I just would like to

- call another workflow from the main workflow (I do not want to send any input, just want the called workflow to be triggered)
- get the output of the called workflow and used it in the main workflow

![image](https://forum-cdn.knime.com/uploads/default/original/3X/6/f/6fd68950c72dadc56cd8fe17b903124a3c94dd65.png)

![image](https://forum-cdn.knime.com/uploads/default/original/3X/2/2/228ef19c128c82658cf49520022d5e928701b4e5.png)

[Main Workflow.knwf](https://forum.knime.com/uploads/short-url/giuvghZVpu7AxoGYPbobgr1FrxU.knwf) (16.5 KB)

[Called\_Workflow.knwf](https://forum.knime.com/uploads/short-url/rxlcmORDV131ELxVAiLjymwP2cc.knwf) (10.4 KB)

It it possible to make it work Knime Platform 4.5.1 ?

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [January 27, 2023, 2:57pm UTC](https://forum.knime.com/t/call-a-workflow-and-get-the-output-as-input-for-the-main-workflow/60530/2 "2023-01-27T14:57:41Z")

</div>

@Fra_S3k_knime you could take a look at these examples and try to adapt them:

> [@use data from another workflow into current workflow](https://forum.knime.com/t/use-data-from-another-workflow-into-current-workflow/45698/2):
>
> @sanderlenselink you can call a KNIME workflow from another one and transfer data to that workflow: What you want to keep in mind is that you will have to make sure what data is created when and do you have the relevant status. KNIME does that via Flow Variables and Workflow orchestration. I would suggest to combine the approaches. Transfering data via KNIME table should be stable:

> **[Call sub workflow from a main KNIME workflow – mlauber71](https://hub.knime.com/mlauber71/spaces/Public/kn_example_call_workflow/a_001_main_workflow~uPGki0nVinczB7SZ/current-state)**
>
> Call sub workflow from a main KNIME workflow. Communicate between them via JSON files

> [@use data from another workflow into current workflow](https://forum.knime.com/t/use-data-from-another-workflow-into-current-workflow/45698/4):
>
> @sanderlenselink I have [toyed around with your data](https://hub.knime.com/mlauber71/spaces/Forum/latest/2022/kn_forum_45698_call_workflow~K0rxn3AXBsaqv1je/) and came up with these options to communicate between the main and sub workflows.

> **[Playing around with Call Workflow - main-workflow to "workflow\_sub" – mlauber71](https://hub.knime.com/mlauber71/spaces/Forum/2022/kn_forum_45698_call_workflow/workflow_main~8waV7WnnqXqwllDT/current-state)**
>
> Playing around with Call Workflow - main-workflow to "workflow\_sub"

---

<div class="post-metadata">

**Author:** ![Fra\_S3k\_knime](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/f/958977/32.png) [@Fra\_S3k\_knime](https://forum.knime.com/u/Fra_S3k_knime)\
**Post date:** [January 27, 2023, 3:14pm UTC](https://forum.knime.com/t/call-a-workflow-and-get-the-output-as-input-for-the-main-workflow/60530/3 "2023-01-27T15:14:21Z")

</div>

Ok, I see I was using a Workflow Service Output instead of a Container Output…:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/2/425a58260ce9df2366b0a8160aa4d7cfeef7870b.png)

This way I am able to get the output of the called workflow in the main workflow.

Thanks !

---

<div class="post-metadata">

**Author:** ![Fra\_S3k\_knime](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/f/958977/32.png) [@Fra\_S3k\_knime](https://forum.knime.com/u/Fra_S3k_knime)\
**Post date:** [January 30, 2023, 3:02pm UTC](https://forum.knime.com/t/call-a-workflow-and-get-the-output-as-input-for-the-main-workflow/60530/4 "2023-01-30T15:02:34Z")

</div>

Hi @mlauber71,

I achieved to understand a bit more about call workflow methods. However, my main goal was to create a workflow which can call another workflow to get the db ports both when running locally as well as when running on server.

I used a Call Workflow Service for that. The problem is that, when the main workflow is running locally (with the workflow to be called is on the server), the Call Workflow Service node do not give any output. The job on the server is created and executed correctly, no error is shown and the main workflow is executed correctly, but the db port just does not work. On the other hand, when the main workflow is executed on server, everything goes well.

Is there something I am misunderstanding about this method ?

Many thanks !

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [April 30, 2023, 3:03pm UTC](https://forum.knime.com/t/call-a-workflow-and-get-the-output-as-input-for-the-main-workflow/60530/5 "2023-04-30T15:03:27Z")

</div>

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