3 Replies Latest reply on Sep 16, 2016 10:40 AM by nino

    Loop through multiple approval groups in a workflow.

    chooi Apprentice

      I would like to be able to have multiple approval groups in a Change record. Then in the Change workflow, I would like to be able to loop through each Approval Group and trigger the appropriate Approval in the GetApproval block. Can anyone share how they implemented looping through multiple items in a workflow? Thanks in advance.

        • 1. Re: Loop through multiple approval groups in a workflow.
          nino Rookie

          We have setup multiple workflows that are triggered by the status of the change request. At the end of each workflow it will update the status and trigger the next workflow with new approvals if necessary. We use approvals from groups and set a percentage before it is considered approved.

          • 2. Re: Loop through multiple approval groups in a workflow.
            chooi Apprentice

            Thanks Nino. How do you loop through each approval group in your Change workflow? Do you use some kind of while logic that will handle any number of approval groups or an if condition for each approval group? And do you call InvokeWorkflow to trigger approval from each approval group?

            • 3. Re: Loop through multiple approval groups in a workflow.
              nino Rookie

              So we loop through the different approval groups in the change request through the status. When the user first creates the change it is in a logged status. At this point there is no workflow at all and gives them time to develop the change plan as well as evaluate the risk level. The user then manually sets the status to requested. When this happens it invokes the first set of approvals. Below are the workflows we have created.

               

               

              These are all set to start with a triggered definition that is the status.

              Inside each workflow is a different set of approval groups. Once it reaches the threshold of over 51% then it uses the approved exit which then sets the status to the next progression of the change.

              This continues through each status with different approval groups at different stages. This is to limit the amount of emails sent to a person before they even need to approve the change.