This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to abort pending IT Shop requests

 We have several pending IT Shop requests that have been outstanding for several months.

 

  Is it possible to abort requests that have been pending for > x days?

 

  Manually in Manager or Object Browser or using a procedure?

  • What about the crazy idea to find out why those are outstanding?
    Peoply in the role escalation approval could also have a look and then decide.
  • Hi

    You can build a DialogMethod which you can call within the Manager when you select the affected request(s). The following code is an example how a DialogMethod could looks like for canceling requests:

    Dim blIsMultiSelectObject As Boolean = TypeOf(Base) Is VI.DB.MultiSelectObject
    Dim sb As New StringBuilder
    Dim strTitle As String = CStr(IIf(blIsMultiSelectObject, "Mehrfachstornierung ohne Benachrichtigung", "Stornierung ohne Benachrichtigung"))
    
    Try
    
    	If Not Base.IsLoaded Then
    	
    		MsgBox (#LD("Not possible in insert mode.")#, MsgBoxStyle.OKOnly Or MsgBoxStyle.Information, "Information")
    		
    	Else
    	
    		Dim strReasonHead As String = InputBox(String.Format("Bitte geben Sie für die {0} einen Grund ein", strTitle), strTitle, "")
    		
    		If Not String.IsNullOrEmpty(strReasonHead) Then
    			
    			If blIsMultiSelectObject Then
    			
    				Dim msoPWO As MultiSelectObject = CType(Base, MultiSelectObject)
    				
    				For Each objPWO As ISingleDbObject In msoPWO
    				
    					Try
    						
    						If Not objPWO.IsLoaded Then objPWO.Load()
    						objPWO.Custom.CallMethod("CancelOrder", objPWO.GetValue("UID_PersonInserted").String, strReasonHead)
    						
    					Catch ex As Exception
    						
    						
    						sb.AppendLine(String.Format("{0} - {1}", objPWO.GetValue("DisplayOrg").String, objPWO.GetValue("DisplayPersonOrdered").String))
    						sb.AppendLine(String.Format("Fehler: {0}", ex.Message))
    						sb.AppendLine(" ")
    						
    					End Try
    					
    				Next
    			
    			Else
    			
    				Try
    					
    					Base.Custom.CallMethod("CancelOrder", Base.GetValue("UID_PersonInserted").String, strReasonHead)
    					
    				Catch ex As Exception
    
    					sb.AppendLine(String.Format("{0} - {1}", Base.GetValue("DisplayOrg").String, Base.GetValue("DisplayPersonOrdered").String))
    					sb.AppendLine(String.Format("Fehler: {0}", ex.Message))
    					
    				End Try
    				
    			End If
    			
    		Else
    		
    			sb.AppendLine(String.Format("Die {0} konnte nicht durchgeführt werden, da kein Grund angegeben wurde.", strTitle))
    			
    		End If
    		
    	End If
    	
    Catch ex As Exception
    
    	Throw New ViException(#LD("An error occurred in the method 'Storno ohne Benachrichtigung'")#, ex)
    	
    Finally
    
    	If Not String.IsNullOrEmpty(sb.ToString()) Then
    	
    		MsgBox(String.Format("Bei der {0} sind folgende Fehler aufgetreten:{1}{1}{2}", strTitle, Environment.NewLine, sb.ToString()), MsgBoxStyle.OkOnly + MsgBoxStyle.Exclamation, strTitle)
    		
    	Else
    	
    		MsgBox(String.Format("Die {0} wurde erfolgreich ausgeführt.", strTitle), MsgBoxStyle.OkOnly, strTitle)
    		
    	End If
    	
    End Try

    Note: The example above is able to handle single and multi-selection. So you can select one or more request at one time to cancel them.

    We are using the method to cancel requests which have been ordered and already assigned by a mistake, so we have assigned the appropriate DialogObject to the DialogMethod. So we can only cancel requests which are no longer in the approval process. If you want to cancel request in the approval process you have to assign the appropriate DialogObject to the DialogMethod.

    -
    Regards
    Sven

  • Great solution Sven. I hope he is using the same version as you are. I am not seeing any version information on his request.

    You can also specify the number of days when a request should be aborted automatically, separately at each workflow. Please check the screenshot from Version 7.1.2

  • Hi Markus

    The code above has been tested under 7.1.1. If it is required I can also provide the code for 6.1.3, but I think it is not really different.

    _
    Regards
    Sven
  • Thanks Sven! We're currently on 7.0.2.4 . Planning to upgrade soon to 7.1.2 but was waiting to here about 8.0 which was supposed to be released sometime Q4 2017. The information you provided was also helpful Markus! Geraldine, your recommendation is a good one assuming we have the resources to manage all the follow-up it would require. Maybe another idea might be to setup a notification reminder that is triggered once the request reaches a certain number of days outstanding. I'd like to look into that idea further. Anyone know if you can manually trigger a reminder notification for requests pending approval from the Governance Administration portal? Similar to pending Attestations.