Workflow Calling Workflow Generates Multiple Runs

Noticing an issue that I haven't yet been able to rationalize:

Within a workflow I have built, I call another workflow which processes the login/request/response/return of a Cognos BI report. In testing the sub-workflow with sample startTrigger data, everything runs smoothly.

When I attempt to test the call of the sub-workflow from the main workflow (by clicking the play button on the node), the sub-workflow is being triggered multiple times:

image

I have only clicked once, and the run button within the sub-workflow does not trigger more than one expected run.

Is this an issue with the "Retool Workflow" nodes?

Do you have any kind of retry logic that might be causing it? Does the sub-workflow send a success/failure response?

The sub-workflow does send a success response.

An additional consideration: the same sub-workflow, when called from an App rather than another Workflow, does not appear to produce the same issue of triggering the workflow multiple times.

The same duplication issue is happening on one of my sub-workflows as well for no apparent reason.

1 Like

I suppose that these are unintended consequences of an update to workflows as a whole, but can't be sure. It makes my goal of reusing a standard workflow quite unattainable, though.

ETA: For at least my case, the sub-workflow runs 10x (for no apparent reason)

Hi @pyrrho. I was not able to reproduce this with a toy example. I have a few questions to help debug:

  • Does this happen when you run the entire workflow using the Run button on the top right of the page?
  • Are you seeing the multiple runs for every execution, or inconsistently?
  • Could you share the workflow structure that's leading to this issue (graph shape and types of each block)?

Hey @rfernandez, thanks for taking a look!

  • This does not happen when I hit the Run button of the sub Workflow, only when the workflow is called directly from another workflow.
  • I am only seeing multiple runs when clicking the play button on the called Workflow node within the main workflow.
  • I just ran a test and confirmed that hitting the Run button in the main workflow does not trigger multiple runs in the sub Workflow and is working as intended.

The sub workflow graph is pretty uninteresting:
image
Although, there is a awaited function call to a REST API in the last JS node to retrieve the information required before decoding it and returning it to the calling workflow. I don't suspect this causes the multiple triggering events (my gut still says this has something to do with the Workflow node itself).

The calling workflow is a little more complex but it is really just branched to call the sub workflow to retrieve different reporting data (this is an indexed lookup in the first JS node of the sub workflow):

From what I have seen this is still only happening when clicking the play button on the node to call the sub-workflow. I just checked again using the same workflow (which succeeded when clicking Run) and the play button generated multiple runs (seems to always be 10, though only 9 listed here because the 10th hadn't started):
image

And the resulting node output in the main Workflow:
image

Thanks again for checking this out.

ETA: Knowing that it works when the main Workflow is being run is helpful (but it makes testing a bit of a headache)

Is there anything in your settings on the workflow call? Like is it accessing a variable that isn't available when you hit play, throwing an error, and retrying or something?

Nope, just the data from the startTrigger and the indexed property from the first JS node. Another thought I had is that it could have been related to the SOAP actions being taken in the sub-Workflow, but I don't think the other user (@bcoles) with the same behavior is doing any of those.