Flow stays running but do not proceed

Hello again !

I am encountering a similar problem in my flow than in my last topic.

When running one of my last flow with loops, the main loop is completed once but then the flow stops processing anything but stays in the running state:

When checking the console, no error are thrown and the last line is the completed PUT request which is the last step of the loop.

The flow is fairly complicated but goes as follows:

First, I call my shopify store to confirm on which environnement I am so I can after set the correct ids of my price tiers. Then, I call my ERP to get the list of item prices which I use in an evaluate to regroup them by item number and replace the price code with the correct price id establish earlier:

Then, for every item (first loop) just grouped in the evaluate, I call my shopify store to get the shopify variant id in the current environment. If the item was found in my store, I format its ID so it can be used later. In a second loop, I go through all the prices of the current item to determine if the price already exist in my B2C platform:

If my call to m B2C platform succeed, the price tier already exists and I construct an update request and then use a PUT http call. If my call fails to my B2C, my price tier does not exist so I create the JSON in a different evaluate and then use a POST call:

When running the flow, I can see the result of the last http request but it is only called once. Then, my flow stay in running state but nothing appears in the console and visually the flow does not proceed anymore.

Any idea would be appreciated,
Thank you

Hey @nicolaslarouche :waving_hand:

I’m hoping that either @flows-daniel or @Rodric-Rabbah would be able to help you out here :folded_hands:

Hi @nicolaslarouche

Apologies for the delay on the reply here.

It looks like your final POST request isn’t running, so that post request receives just the varientid but not the body and send signals which can cause the for loop to stall and leave your flow in this state. If you put an if block before that final post request and only pass in the varientid when the body will be present that may fix your issue.

Hello,

I have tried to pass all my data through an if block before sending it to the http request:

But I have still the same issue going on. Also, I thought that by passing my body from the evaluate to the ‘Send’ input of the http request, it would only be triggered when that input is sent to the http block ?

Thanks

Hi @nicolaslarouche

I think you have the same problem with your create your pricing tier block. When in a loop, if a block receives just some of it’s inputs it stalls because it waits until it receives all it’s inputs to run so the flow never finishes. This is because the fail port of your send request before it likely doesn’t trigger.

Happy to jump on a call to debug this issue. I’ll DM you the link.