From fd4a5a5349c4aa0ca962335a5d1657c15d7b0743 Mon Sep 17 00:00:00 2001 From: "jason.gloger" Date: Mon, 24 Jul 2023 16:33:18 +0200 Subject: [PATCH 1/2] Gave the use information, when the document is already processed. --- .../WorkflowApplicationHelper.cs | 46 +++++++++++-------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/Simplic.FileStructure.Workflow.UI/WorkflowApplicationHelper.cs b/src/Simplic.FileStructure.Workflow.UI/WorkflowApplicationHelper.cs index 711dbca..e1eb817 100644 --- a/src/Simplic.FileStructure.Workflow.UI/WorkflowApplicationHelper.cs +++ b/src/Simplic.FileStructure.Workflow.UI/WorkflowApplicationHelper.cs @@ -88,36 +88,46 @@ public static GridInvokeMethodResult EditWorkflowOrganizaitonUnit(GridFunctionPa #region [ContextMenuStuff] /// - /// Forwards the document to all user who installed the Workflow + /// Forwards the document to all user who installed the Workflow. /// /// Grid parameter /// Grid invoke result, to control grid refresh public static GridInvokeMethodResult ForwardTo(GridFunctionParameter parameter) { IList workflowOperationList; - if (forwardConfig == 1) - workflowOperationList = WorkflowOperationsItemBoxGet(parameter); - - else - workflowOperationList = WorkflowOperationsGet(parameter); + try + { + if (forwardConfig == 1) + workflowOperationList = WorkflowOperationsItemBoxGet(parameter); - if (workflowOperationList == null) - return GridInvokeMethodResult.NoGridRefresh(); + else + workflowOperationList = WorkflowOperationsGet(parameter); - foreach (var workflowOperation in workflowOperationList) - { - try - { - workflowOperationService.ForwardTo(workflowOperation); - } - catch (DocumentWorkflowException ex) + if (workflowOperationList == null) + return GridInvokeMethodResult.NoGridRefresh(); + + foreach (var workflowOperation in workflowOperationList) { - Log.LogManagerInstance.Instance.Error("Could not forward document in workflow", ex); + try + { + workflowOperationService.ForwardTo(workflowOperation); + } + catch (DocumentWorkflowException ex) + { + Log.LogManagerInstance.Instance.Error("Could not forward document in workflow", ex); - MessageBox.Show("filestructure_forward_error", "filestructure_forward_error_head", MessageBoxButton.OK, MessageBoxImage.Information); - return GridInvokeMethodResult.NoGridRefresh(); + MessageBox.Show("filestructure_forward_error", "filestructure_forward_error_head", MessageBoxButton.OK, MessageBoxImage.Information); + return GridInvokeMethodResult.NoGridRefresh(); + } } + } + catch(CoreException ex) + { + Log.LogManagerInstance.Instance.Error("Could not forward document in workflow", ex); + MessageBox.Show("Das Dokument wurde bereits bearbeitet."); + return GridInvokeMethodResult.NoGridRefresh(); } + return new GridInvokeMethodResult { RefreshGrid = true }; } From 6d276be05dad1e8db83f35d2923c1b130efa4512 Mon Sep 17 00:00:00 2001 From: "jason.gloger" Date: Mon, 24 Jul 2023 16:36:13 +0200 Subject: [PATCH 2/2] Added release notes. --- release-notes.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release-notes.xml b/release-notes.xml index c41c859..361f09a 100644 --- a/release-notes.xml +++ b/release-notes.xml @@ -85,4 +85,7 @@ Fixes a bug when no organization is present in the current session. + + Gave user information if document is already processed. + \ No newline at end of file