on 04-14-2017 3:53 PM
I am working with EPM SP27 patch 2 and trying to implement RunPackage API to pass answer prompt to DM package. Everything correctly but I am unable to delete answer file after RunPackage execution.
epmDM.RunPackage epmDMPackage, strAnswerFileName
Kill strAnswerFileName
The file strAnswerFileName is still open after RunPackage execution!
After decompile of EPM code in ILSpy I can see the reason:
Public Sub RunPackage(package As IADMPackage, filename As String)
Try
SAPModuleNameInspectorBehavior.ModuleOverride = "DataManager"
If package Is Nothing Then
Throw New InvalidArgException(String.Format(Resources.ExceptionParameterIsNull, "package"))
End If
package.CheckParameters()
If filename Is Nothing Then
Throw New InvalidArgException(String.Format(Resources.ExceptionParameterIsNull, "filename"))
End If
If filename.Trim() = "" Then
Throw New InvalidArgException(String.Format(Resources.ExceptionPropertyOfObjectIsAnEmptyString, MyBase.[GetType]().ToString(), "filename"))
End If
Try
Dim fi As System.IO.FileInfo = New System.IO.FileInfo(filename)
If Not fi.Exists Then
Throw New InvalidArgException("File doesn't exists")
End If
Dim fs As System.IO.FileStream = fi.OpenRead()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(fs)
Dim content As String = sr.ReadToEnd()
...
But I don't see sr.Close until the end of procedure
Looks like bug!
Bug is STILL there as of 2.6.100.78647
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even with introduction of DataManagerAdvancedRunPackage in EPM SP 29 Patch 01 it's still not possible to delete answer file immediately after package run. Same lock.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.