Dutch Power Apps and Power Automate User Group

Please login or click SIGN UP FOR FREE to create your PowerPlatformUG account to join this user group.
Expand all | Collapse all

Loops in approval flow

  • 1.  Loops in approval flow

    Posted Apr 08, 2020 08:02 AM
      |   view attached
    I tried multiple ways to create a simple approval flow when a document is added in a SharePoint list or library.
    Each time I fall back to the same problem.  The same approval emails keeps coming even after registered approvals.
    I don't think it is because of an error in my flow it is working the way I expect.
    During the flow I update some status fields in the linked item, perhaps this trigger the flow to start again?
    Perhaps a time out setting in the admin center?


    ------------------------------
    Erik Pauwels
    Solution architect
    Willebroek
    ------------------------------


  • 2.  RE: Loops in approval flow

    Posted Apr 08, 2020 04:04 PM
    Edited by Darlene Suarez Apr 08, 2020 04:26 PM
    From the screen shot, I see that you have an initial approval task then you branch to 2 parallel paths after the initial 1st approval completes:
    • Path 1
      • Condition 1
        • If approved
          • Send notification
          • Then start and wait for 2nd level approval
          • After 2nd approval completes
          • Condition 2 with no outcome paths shown
        • if rejected
          • Send notification
          • Then update item
    • Path 2
      • Send email
      • Then terminate the flow*
    *Are you really wanting to terminate the flow here? You only need to use the Terminate action if you are wanting to stop the entire flow process based on specific criteria.

    If the above are not the steps you are trying to accomplish, do you have the business process/rules in plain written format. That will help to determine if the flow paths are correct.

    Also, I noticed that you use the When Item Created or Modified trigger, I think you only want to use the When Item Created trigger otherwise every time the item is modified as in the path where you update the item it will trigger the same flow to run again.

    ------------------------------
    Darlene Suarez
    Consultant
    Houston TX
    2816500846
    ------------------------------



  • 3.  RE: Loops in approval flow

    Posted Apr 09, 2020 04:03 AM
    Hi @Darlene Suarez,

    if the first approver is rejecting or any approver, status is Rejected and the flow can end.  But even when the approver Reject the same flow stats again after a few minutes and all approvers are receiving the same emails again ???  Any idea why I have this loop?​

    ------------------------------
    Erik Pauwels
    Solution architect
    Willebroek
    ------------------------------



  • 4.  RE: Loops in approval flow

    Posted Apr 09, 2020 11:15 AM
    Change the first action which is your trigger to When an Item is Created instead of When an Item is Created or Modified.

    If you are requiring resubmittals after rejection and allowing approval to kick off when modified and not just created. It will require more complex workflow structure, with data source storing approval level 1 and approval level 2 statuses and wrapping the flow paths into Switch action so that you can direct the various path options based on statuses.

    ------------------------------
    Darlene Suarez
    Consultant
    Kingwood TX
    2816500846
    ------------------------------



  • 5.  RE: Loops in approval flow

    Posted Apr 10, 2020 03:05 AM
    Hi Darlene,

    thanks for your follow-up on this topic.  In your first reply you were right about the terminate flow, I forgot about that path :-)
    Yes, the SWITCH action is the way to go I guess and I'm going run some test using it.
    In the end, when I get this working with no loops, I want to migrate my current Work Procedures in SP2010 to SP2016. It has a rather complex approval flow.  Everyone can add a new procedure or start a Change Procedure, then we have a moderator who checks the content.  Then the moderator assign approval groups based on content.  Up to 4 approvers, the Area Owner, HS&E, Food Safety and Quality.

    ------------------------------
    Erik Pauwels
    Solution architect
    Willebroek
    ------------------------------