feat(domain): add close workflow outcome semantics

This commit is contained in:
2026-10-10 16:11:27 +02:00
parent c5a43ef2a0
commit f8e877ac06
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
namespace DigitalData.TaskFlow.Domain.Closing;
/// <summary>
/// Defines business outcomes of a close workflow attempt.
/// </summary>
public enum CloseWorkflowOutcome
{
/// <summary>
/// Workflow can be closed successfully.
/// </summary>
Closed = 0,
/// <summary>
/// Caller has no access to the requested workflow.
/// </summary>
NoAccess = 1,
/// <summary>
/// Workflow process was not found.
/// </summary>
NotFound = 2,
/// <summary>
/// Workflow is already closed and cannot be closed again.
/// </summary>
AlreadyClosed = 3,
/// <summary>
/// Closing cannot be completed yet because write integration is not finalized.
/// </summary>
NotImplemented = 4
}

View File

@@ -14,4 +14,9 @@ public sealed record CloseWorkflowResult
/// Gets a value indicating whether the process was closed successfully.
/// </summary>
public required bool IsClosed { get; init; }
/// <summary>
/// Gets the business outcome of the close request.
/// </summary>
public CloseWorkflowOutcome Outcome { get; init; } = CloseWorkflowOutcome.Closed;
}