code: def handle_AnalysisRequest(self, instance):
          
          # - If AR is sample_due: receive it before proceeding.
          wf = getToolByName(self.context, 'portal_workflow')
          if wf.getInfoFor(instance, 'review_state') == 'sample_due':
              try:
                  wf.doActionFor(instance, 'receive')
              except WorkflowException:
                  pass
          # - If AR belongs to Batch, redirect to the BatchBook view.
          batch = instance.getBatch()
          if batch:
              return batch.absolute_url() + "/batchbook"
          #  - if permission/workflow permit: go to AR manage_results.
          mtool = getToolByName(self.context, 'portal_membership')
          if mtool.checkPermission(EditResults, instance):
              return instance.absolute_url() + '/manage_results'
          # - For other ARs, just redirect to the view screen.
          return instance.absolute_url()
docs: Possible redirects for an AR.
          - If AR is sample_due: receive it before proceeding.
          - If AR belongs to Batch, redirect to the BatchBook view.
          - If AR does not belong to Batch:
              - if permission/workflow permit: go to AR manage_results.
          - For other ARs, just redirect to the view screen.