question

AnkitKumar-6861 avatar image
0 Votes"
AnkitKumar-6861 asked MayankBargali-MSFT edited

Azure Logic App- Sliding Window vs Recurrence

Hi ,
I am more looking to get a clarity on Sliding Window trigger in logic apps and how it differs from Recurrence.

My current workflow in Logic App: I have a SharePoint folder from where I am sending the information about each file in the folder to Service Bus and then moving the files inside the folder to other folder in same SharePoint site. Also in the folder there is a metadata file which is skipped by the flow as metadata file is read for each file when the message is passed to service bus . Now there are more than 500 files which gets uploaded in the SharePoint folder.

My confusion with triggers: I wanted my logic app to process all the files in the folder in one run and it should not start the other run unless all the files in the folder has been processed. So I did a recurrence trigger with concurrency as 1 and set for every 1 hour. I see the same option is for Sliding Window. And here I fail to understand what is the difference. Recurrence will not allow my logic app session to overlap since I have kept the concurrency as 1. will that same thing will be for Sliding window?

If some one can explain this (maybe with a small example)?

Thanks



azure-logic-apps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MayankBargali-MSFT avatar image
0 Votes"
MayankBargali-MSFT answered MayankBargali-MSFT edited

Hi @AnkitKumar-6861

You can refer to this document to know more details on what is the difference between the two triggers.

When you mentioned, "I see the same option is for Sliding Window." I think you mean to say that you don't see the same option (Concurrency Control) as this is not available for Sliding Window.

In nutshell, for the Recurrence trigger when you are setting the concurrency as one for every one hour it means that your workflow will be triggered every one hour. If the trigger misses recurrences, for example, due to disruptions or disabled workflows, the Recurrence trigger doesn't process the missed recurrences but restarts recurrences with the next scheduled interval.

Whereas when you use Sliding Window trigger it will trigger every one hour. If recurrences are missed for any reason, for example, due to disruptions or disabled workflows, this trigger processes those missed recurrences. Lets' say if you have disabled the trigger for 5 hr then there will be five misses but as soon as you have enabled the trigger again the logic app starts 5 times simultaneously.

Hope the above clears things up. Feel free to get back to me if you have any queries or concerns.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

So What happens in this case if my sliding windows trigger is set for every 1 hour :

if my logic app is processing 1000 files but within an hour only 500 files has been processed, What will happen? Will my flow continue with its ongoing session and the next session will be queued or will it stop and a new session of flow will start which will process rest of the 500 files?

FYI i want my one session of flow to process all the files in a folder.

0 Votes 0 ·

@AnkitKumar-6861 If your processing takes a long time and the next trigger is due then there should be two workflows running parallelly. I have tested the same and confirmed. As there is no way to set the concurrency option in the sliding window trigger. In this scenario, if you think that processing might take more time then you need to tweak the how often to check for item value with the best possible value which makes sure that all the files are processed within that time if you are using the slidder window trigger.

0 Votes 0 ·