Cannot get "Call Workflow (Row based)" to work

Dear KNIMErs,

I am currently following @Maarit 's great example from this blog post to test out “how to create my own REST API using KNIME”:

However, I simply cannot get the caller workflow to execute the callee workflow.

Following Maarit’s advice I first import the csv, then filter for one column and turn that one column into a JSON. This then is sent through the Call Workflow (Row Based) Node to the callee workflow where I try to get some statistics of that one column but all I get back from the callee workflow is exactly the same JSON column that I sent and then a status message that read “Failure, workflow was not executed.
Workflow Service Input 3:4: No data object set from calling workflow (via external API)”

I am not sure if the Workflow Service Input and Output Nodes from the callee WF are set the right way but this is also pretty hard to test, as this workflow cannot be executed “alone”.

Any advice? Thanks!

Hi @kowisoft, sorry for the long wait to get back to you!

If I’ve understood correctly what you’re trying to execute is the following:

As far as I can see this works fine, as the caller uses the Call Workflow (Row Based) node to call the callee, which contains the Container Input (JSON). Check the table below to get a summary overview:

If you are using the caller workflow above to call a callee workflow that uses the Workflow Service (Input/Output) nodes (that seems to be the problem as far as I can see), this is not going to work.

Hope it helps,

Hi! Thanks for the detailed description of the problem. The problem might be that you’re mixing wrong caller and input/output nodes. See Table 1 in the blog post.

Call Workflow Service node goes together with Workflow Service Input and Output nodes. So, could you try to call the workflow with the Call Workflow Service node instead of the Call Workflow (Row Based) node?

1 Like

hmmm… I am not sure if it is me reading the blog post wrong.

So what I basically did was to “rebuild” the shared workflows from the blog post.

  • one is the Caller workflow and this uses the Call Workflow Service (Row Based) node so I though, I use this one as well
  • the other one is the Callee workflow and it basically only has the Statistics node embedded between a Workflow Service Input node and a Workflow Service Output node

Tried to replicate exactly that and always get the message that it “Failure, workflow was not executed. Workflow Input Service 4.2: No data object set from calling workflow (via external API)

I looked into the Call Workflow (Row Based) node configuration and see that there is a section of “Input parameters” but it’s empty. Not sure if this is where the data object should be set as mentioned above in the error message.

I also tried to use the Call Workflow Service Node as suggested by @Maarit in her response but there I only get an empty table back although I have adjusted the input / output ports during node configuration (as advised by the node configuration).

I was expecting that I hand over my JSON to the Call Workflow Service Node, it does its processing thing and then returns a JSON which I then would “translate” utilizing the JSON to Table node.

If you edit your workflow to use the Call Workflow Service node in the caller, and keep the Workflow Service Input/Output nodes in the callee, then you don’t need to pass a JSON input (see screenshot below).

Upon configuring the Call Workflow Service node, this automatically recognize the input/output ports that it needs based on the workflow callee and it returns the proper output table (see again screenshot below).

The reason why in Maarit’s original workflow she hands over a JSON object to the Call Workflow (Row Based) is because the callee contains the Container Input/Output (JSON) nodes. Does that make a bit more sense now?

I encourage you to check the summary table screenshot that I shared above (it’s also available in the blog post). It explains quite well the right combinations your caller and calee workflows should have :slight_smile: .

Hope it helps :slight_smile:,

PS: my personal trick to remember the right combination is to check if the word “Service” is in the node name. Then, I know what I need to use the in the callee/caller.

1 Like

Understood, now it works. :slight_smile:

Thank you also for the trick to remember it.


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