MS Jobrunner only start when job exists
This commit is contained in:
@@ -33,7 +33,7 @@ Public Class frmDocumentResultList
|
||||
Public Property ShouldReturnToPreviousForm As Boolean = False Implements IResultForm.ShouldReturnToPreviousForm
|
||||
|
||||
' Helper Classes
|
||||
Private Client As Client
|
||||
Private EDMI_API_Client As Client
|
||||
Private Documentloader As Loader
|
||||
Private ControlManager As AttributeControls
|
||||
Private CheckoutManager As CheckInOut
|
||||
@@ -168,7 +168,7 @@ Public Class frmDocumentResultList
|
||||
|
||||
LanguageEx.LogApplicationLanguage(Logger)
|
||||
|
||||
Documentloader = New Loader(LogConfig, OperationMode, Client, Environment.User)
|
||||
Documentloader = New Loader(LogConfig, OperationMode, EDMI_API_Client, Environment.User)
|
||||
|
||||
If OperationMode = OperationMode.NoAppServer Then
|
||||
Watcher = New Watcher(LogConfig, pEnableWatching:=False)
|
||||
@@ -219,7 +219,7 @@ Public Class frmDocumentResultList
|
||||
RibbonPageGroup_Navigation.Visible = Params.ShowBackNavigation
|
||||
|
||||
If OperationMode = OperationMode.ZooFlow Or OperationMode = OperationMode.WithAppServer Then
|
||||
CtrlObjectPropertyDialog.Initialize(LogConfig, Me, Client, Environment)
|
||||
CtrlObjectPropertyDialog.Initialize(LogConfig, Me, EDMI_API_Client, Environment)
|
||||
CtrlObjectPropertyDialog.Hide()
|
||||
SwitchMainContainerHorizontal.Visibility = BarItemVisibility.Never
|
||||
SwitchDetailContainerHorizontal.Visibility = BarItemVisibility.Never
|
||||
@@ -419,7 +419,7 @@ Public Class frmDocumentResultList
|
||||
#Region "Watcher"
|
||||
|
||||
Public Async Sub Watcher_FileOpened(sender As Object, e As DocumentResultList.Watcher.FileOpenedArgs) Handles Watcher.FileOpened
|
||||
Await Client.SetObjectStateAsync(e.File.Document.Id, OBJECT_STATE_FILE_OPENED, New Options.SetObjectStateOptions With {
|
||||
Await EDMI_API_Client.SetObjectStateAsync(e.File.Document.Id, OBJECT_STATE_FILE_OPENED, New Options.SetObjectStateOptions With {
|
||||
.Language = Environment.User.Language,
|
||||
.Username = Environment.User.UserName
|
||||
})
|
||||
@@ -430,7 +430,7 @@ Public Class frmDocumentResultList
|
||||
Dim oDoctype As GlobalStateDoctype = Nothing
|
||||
|
||||
If e.File.Document.DocumentType IsNot Nothing Then
|
||||
oDoctype = Client.ClientConfig.DocumentTypes.
|
||||
oDoctype = EDMI_API_Client.ClientConfig.DocumentTypes.
|
||||
Where(Function(doctype) doctype.Name = e.File.Document.DocumentType).
|
||||
FirstOrDefault()
|
||||
End If
|
||||
@@ -477,7 +477,7 @@ Public Class frmDocumentResultList
|
||||
Private Async Function Watcher_UpdateFile(pFile As DocumentResultList.Watcher.OpenFile, pCreateNewVersion As Boolean) As Task
|
||||
Dim oFileInfo As New FileInfo(pFile.FilePath)
|
||||
Dim oDisplayName As String = pFile.Document.DisplayFileName
|
||||
Dim oObjectId = Await Client.UpdateFileAsync(pFile.Document.Id, pFile.FilePath, New Options.UpdateFileOptions With {
|
||||
Dim oObjectId = Await EDMI_API_Client.UpdateFileAsync(pFile.Document.Id, pFile.FilePath, New Options.UpdateFileOptions With {
|
||||
.CreateNewFileVersion = pCreateNewVersion,
|
||||
.Language = Environment.User.Language,
|
||||
.Username = Environment.User.UserName
|
||||
@@ -521,11 +521,11 @@ Public Class frmDocumentResultList
|
||||
Dim oAddress As String = oServerAddress.Item1
|
||||
Dim oPort As Integer = oServerAddress.Item2
|
||||
|
||||
Client = New Client(LogConfig, oAddress, oPort)
|
||||
ControlManager = New AttributeControls(LogConfig, Environment, Client)
|
||||
CheckoutManager = New CheckInOut(LogConfig, Client)
|
||||
EDMI_API_Client = New Client(LogConfig, oAddress, oPort)
|
||||
ControlManager = New AttributeControls(LogConfig, Environment, EDMI_API_Client)
|
||||
CheckoutManager = New CheckInOut(LogConfig, EDMI_API_Client)
|
||||
|
||||
If Not Client.Connect() Then
|
||||
If Not EDMI_API_Client.Connect() Then
|
||||
Logger.Warn("Client could not connect to Service at [{0}]", Environment.Service.Address)
|
||||
Return False
|
||||
End If
|
||||
@@ -920,7 +920,7 @@ Public Class frmDocumentResultList
|
||||
FileEx.OpenFileProperties(_CurrentDocument.FullPath)
|
||||
|
||||
Case Else
|
||||
Dim oPropertyDialog As New frmObjectPropertyDialog(LogConfig, Environment, Client, _CurrentDocument.Id)
|
||||
Dim oPropertyDialog As New frmObjectPropertyDialog(LogConfig, Environment, EDMI_API_Client, _CurrentDocument.Id)
|
||||
oPropertyDialog.Show()
|
||||
End Select
|
||||
End Sub
|
||||
@@ -970,13 +970,13 @@ Public Class frmDocumentResultList
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Await Client.CheckOutFile(oObjectId, oResultComment)
|
||||
Await EDMI_API_Client.CheckOutFile(oObjectId, oResultComment)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MenuItemCheckInFile_ItemClick(sender As Object, e As ItemClickEventArgs) Handles MenuItemCheckInFile.ItemClick
|
||||
Dim oObjectId = _CurrentDocument?.Id
|
||||
Client.CheckInFile(oObjectId)
|
||||
EDMI_API_Client.CheckInFile(oObjectId)
|
||||
End Sub
|
||||
|
||||
Private Function ShowCheckInOutCommentForm()
|
||||
|
||||
Reference in New Issue
Block a user