We have a script to delete the electronic file component of a document through the SDK. However, when the workflow runs we get a "Error sending HTTP request to the server" error and are not sure why. The workflow profile connection is the fully qualified server name and workflow and the repository are on the same box.
Here is the code of the script:
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text
Imports Laserfiche.RepositoryAccess
Namespace WorkflowActivity.Scripting.SDKScript2
'''<summary>
'''Provides one or more methods that can be run when the workflow scripting activity is performed.
'''</summary>
Public Class Script1
Inherits RAScriptClass100
Protected Overrides Sub Execute()
dim di as DocumentInfo = Document.GetDocumentInfo(StartingEntryInfo.Id, RASession)
di.DeleteEdoc()
di.Dispose()
End Sub
End Class
End Namespace
I also have another script that OCR's the document and that works totally fine:
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text
Imports Laserfiche.RepositoryAccess
imports Laserfiche.DocumentServices
Namespace WorkflowActivity.Scripting.SDKScript3
'''<summary>
'''Provides one or more methods that can be run when the workflow scripting activity is performed.
'''</summary>
Public Class Script1
Inherits RAScriptClass100
'''<summary>
'''This method is run when the activity is performed.
'''</summary>
Protected Overrides Sub Execute()
Using ocr As OcrEngine = OcrEngine.LoadEngine()
dim id as Int32 = Integer.Parse(GetTokenValue("Entry ID"))
dim d as DocumentInfo = new DocumentInfo(id,RASession)
ocr.Run(d)
End Using
End Sub
End Class
I know they are different scripts but I am not sure why one cannot seem to connect to the server it is already on..
Thanks,
Chris