execution of workflows in sequenzial order

Hy everyone!
I have a workflow which is calling two other workflows via “Call Local Workflow (Row Based)”.

In other Words
[Workflow A] calls [Workflow B] & [Workflow C] (parallel)
[Workflow B] calls [Workflow C]

One of this workflows calls the other workflow and adds some data.
Both sub-workflows (B and C) generate Reports which I save to files in the top workflow [A].

Is it possible to hold sub-workflow B until the sub-workflow [C] is executed. to avoid that [B] is executed several times? I only found a node “Wait” which waits until a file is generated, but I would like to start earlier.

thanks for advices
Matthias

Hello @Matthias_W,

and welcome to KNIME Community!

If I got it right you should use flow variable connection (red connection line). Do you know about them? They also control execution order besides transferring flow variables.

Br,
Ivan

1 Like

Thank you Ivan for your fast reply. It worked perfekt.
is there a posibility to pass variables to the called Workflows. I tried it via red connection, but I do not see them in the sub workflow. I also do not see variables from the sub-workflow in the calling workflow.

Currently I use [Variable to Row] → [JSON to Table] Nodes to pass variables from the calling workflow to the sub workflow. In the sub-workflow I use [Container input]->[JSON to Table]->[Table Row to Variable] to transform the Data to back to Variables. Is there a easier way?

1 Like

Hello @Matthias_W,

glad it worked. Maybe there is. You can use Container Input (Variable) in called workflow and construct JSON column in calling workflow which you then pass via configuration window of Call Local Workflow (Row Based) node. For JSON column I followed this structure:

{
    "variables": [
        {
            "variable-string": "somevariable"
        },
        {
            "variable-double": 42.0
        },
        {
            "variable-int": 100
        }
    ]
}

Additionally combination of Call Workflow (Table Based) and Container Input (Variable) pushes all flow variables to called workflow without need to create JSON column.

Br,
Ivan

1 Like

Hello Ivan!
thank you one again. The Container Input (Variable) throws an error if I try it this way. Using [Container Input (JSON)] → [JSON to Table] → [Table Row to Variable] works perfekt. I will leave it this way since I see no shortfall.

cheers
Matthias

1 Like

Hello @Matthias_W,

sure. Should’t be any so you are good.

Br,
Ivan

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