2 Replies Latest reply on Aug 31, 2018 5:00 AM by rodrigo barcat

    Which is the best way to do a bypass on an approval?

    rodrigo barcat
      Share This:

      Hello guys.

       

      I created a custom approval through SRD questions and everything works fine.

       

      However, there is a requirement of the customer so that when the approver is the requester itself, or when the Manager field is blank in the ctm:people run a bypass on approval and follow the defined flow directly (Creating WorkOrder/Incidents).

       

      In my current scenario, when the manager is the requester himself or the manager login field goes blank, the requisition changes the status to In Progress and record an error event. So, work order/incidents are not created.

       

      I was able to make a contour solution. When the event returns error (approval chains), I set the Request status to Planning, so the flow goes on. But I believe that is not the correct way.

       

      My chain configuration. Here is the place where I set status Planning, on error. The error occur when manager login is null or when the requester approval itself.

       

      Here is my rules. I believe that I will achieve my challenge configuring these rules, but I do not find the point!!!

       

      Thank you all!!!

        • 1. Re: Which is the best way to do a bypass on an approval?
          Sinisa Mikor

          Hello,

           

          instead of dealing with errors, you could use (or define one if necessary) an "Auto Approve" process to be used instead of the one you're using when approval isn't needed.

           

          One way to achieve that would be to reserve one of request's SR Type Field fields for approval process identifier (you could use numeric fields populated with numbers, or character fields populated with readable descriptions -- either way, you can define values as you wish), and another for semicolon separated list of approvers' login IDs.  For example, use any combination of appropriate SRD actions to prepare values to be mapped to SR Type Field 42 (approval proces identifier) and SR Type Field 43 (list of approvers) using Service Request Field Mapping -- in this case, $SR Type Field 42$ might end up populated with "Single Approver Process" if approval is necessary, or "Auto Approval Process" if approval isn't needed.

           

          The next step is changing your approval chain definitions, specifically <Selection Criteria*>.  Instead of listing SRD IDs, you can simply define it as ''z1D_Approval_Keyword' = "SRM_CUSTOM" AND 'SR Type Field 42' = "Single Approver Process" in approval chain requiring approval, or ''z1D_Approval_Keyword' = "SRM_CUSTOM" AND 'SR Type Field 42' = "Auto Approval Process" in approval chain which doesn't require approval.

           

          As well as working around your problem, this method should give you enough flexibility to be used over and over in multiple SRDs; if necessary, you could expand list of available approval processes to "One Must Approve Process", "All Must Approve Process" or any other process type you need as well.

          3 of 3 people found this helpful