Skip to content

Added a message box, when a document is already processed. (~6435) #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions release-notes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
<ChangeSet guid="bd9c5116-cb24-43db-a56e-64a3fa22ce50">
<Change type="bug">Fixes a bug when no organization is present in the current session.</Change>
</ChangeSet>
<ChangeSet>
<Change type="enhancement">Gave user information if document is already processed.</Change>
<ChangeSet guid="a9c7056d-fba1-4f64-9b81-42900eb71059">
<Change type="bug">Extens the DocumentWorkflowTracker by path.</Change>
</ChangeSet>
Expand Down
46 changes: 28 additions & 18 deletions src/Simplic.FileStructure.Workflow.UI/WorkflowApplicationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,36 +88,46 @@ public static GridInvokeMethodResult EditWorkflowOrganizaitonUnit(GridFunctionPa

#region [ContextMenuStuff]
/// <summary>
/// Forwards the document to all user who installed the Workflow
/// Forwards the document to all user who installed the Workflow.
/// </summary>
/// <param name="parameter">Grid parameter</param>
/// <returns>Grid invoke result, to control grid refresh</returns>
public static GridInvokeMethodResult ForwardTo(GridFunctionParameter parameter)
{
IList<WorkflowOperation> 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 };
}

Expand Down