scottdurow / RibbonWorkbench

Ribbon Workbench 2016 for Dynamics 365
https://ribbonworkbench.uservoice.com/
MIT License
72 stars 24 forks source link

WaitForWorkflowToComplete resulting in multiple API calls while waiting for Workflow to Complete #75

Open adamrouse opened 3 years ago

adamrouse commented 3 years ago

Since Dynamics 365 is monitoring API requests, and limits per user start at 20,000 requests per 24 hours. This function is causing 25+ API calls for a simple trigger of a workflow that takes 25 seconds or more to run. I see a delay of 1000 ms in this function, which explains why its doing the async call so frequently.

Is there any way to reduce the frequency of checks?

F12 Trace log showing multiple API calls to check status of the workflow, the workflow took minutes to complete, at 80 seconds of waiting, the button has made 100's of calls to check the status. image