From 800f10f9fb9e7d00a7f0c657cef4a82ec763f7e9 Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Mon, 23 Feb 2026 23:13:55 +0000 Subject: [PATCH] Moved the duration to ITask, so it's common to everything. More work on the ApprovalTask, IOutcome should now be working. --- e-suite.Workflow.Core/Interfaces/IBudget.cs | 5 ----- e-suite.Workflow.Core/Interfaces/IOutcome.cs | 1 + e-suite.Workflow.Core/Interfaces/ITask.cs | 5 +++++ e-suite.Workflow.Core/TaskBase.cs | 3 ++- e-suite.Workflow.Core/Tasks/AdhocApprovalTask.cs | 1 + e-suite.Workflow.Core/Tasks/ApprovalTask.cs | 1 + 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/e-suite.Workflow.Core/Interfaces/IBudget.cs b/e-suite.Workflow.Core/Interfaces/IBudget.cs index 340d778..e9ada55 100644 --- a/e-suite.Workflow.Core/Interfaces/IBudget.cs +++ b/e-suite.Workflow.Core/Interfaces/IBudget.cs @@ -30,9 +30,4 @@ public interface IBudget /// Priority of this item /// public Priority Priority { get; set; } - - /// - /// alloted duration of this item. - /// - public TimeSpan Duration { get; set; } } \ No newline at end of file diff --git a/e-suite.Workflow.Core/Interfaces/IOutcome.cs b/e-suite.Workflow.Core/Interfaces/IOutcome.cs index eb6c9d5..b069490 100644 --- a/e-suite.Workflow.Core/Interfaces/IOutcome.cs +++ b/e-suite.Workflow.Core/Interfaces/IOutcome.cs @@ -9,4 +9,5 @@ public interface IOutcome //public T? TaskOutcome { get; set; } Dictionary OutcomeActions { get; set; } + bool OverrideDefaultTaskProgression { get; set; } } \ No newline at end of file diff --git a/e-suite.Workflow.Core/Interfaces/ITask.cs b/e-suite.Workflow.Core/Interfaces/ITask.cs index 886c2f6..8694e89 100644 --- a/e-suite.Workflow.Core/Interfaces/ITask.cs +++ b/e-suite.Workflow.Core/Interfaces/ITask.cs @@ -25,6 +25,11 @@ public interface ITask /// string Description { get; set; } + /// + /// alloted duration of this item. + /// + public TimeSpan Duration { get; set; } + /// /// List of tasks that need to be completed before this on can start. (If empty, will start when the workflow starts) /// diff --git a/e-suite.Workflow.Core/TaskBase.cs b/e-suite.Workflow.Core/TaskBase.cs index cb2236d..ec71ec2 100644 --- a/e-suite.Workflow.Core/TaskBase.cs +++ b/e-suite.Workflow.Core/TaskBase.cs @@ -9,13 +9,14 @@ public abstract class TaskBase : ITask, IBudget, ITags public required ITask Parent { get; set; } public required string Name { get; set; } public string Description { get; set; } = string.Empty; + + public required TimeSpan Duration { get; set; } public List Predecessors { get; set; } = []; public decimal UnitsOfWork { get; set; } = 1; public required Cost Cost { get; set; } public BudgetOption BudgetOption { get; set; } = BudgetOption.DoNotShow; public bool AllowTimeTracking { get; set; } = true; public Priority Priority { get; set; } = Priority.Normal; - public required TimeSpan Duration { get; set; } public IList Tags { get; set; } = new List(); //Todo can only be on a run-time instance diff --git a/e-suite.Workflow.Core/Tasks/AdhocApprovalTask.cs b/e-suite.Workflow.Core/Tasks/AdhocApprovalTask.cs index 1f92099..aec5eb2 100644 --- a/e-suite.Workflow.Core/Tasks/AdhocApprovalTask.cs +++ b/e-suite.Workflow.Core/Tasks/AdhocApprovalTask.cs @@ -10,4 +10,5 @@ public class AdhocApprovalTask : TaskBase, IAssignees, IO public IList Assignees { get; } = new List(); public ApprovalVerdict TaskOutcome { get; set; } public Dictionary OutcomeActions { get; set; } + public bool OverrideDefaultTaskProgression { get; set; } } \ No newline at end of file diff --git a/e-suite.Workflow.Core/Tasks/ApprovalTask.cs b/e-suite.Workflow.Core/Tasks/ApprovalTask.cs index bce568c..fe50fbd 100644 --- a/e-suite.Workflow.Core/Tasks/ApprovalTask.cs +++ b/e-suite.Workflow.Core/Tasks/ApprovalTask.cs @@ -10,4 +10,5 @@ public class ApprovalTask : TaskBase, IStage, IOutcome Tasks { get; } = new List(); public ApprovalVerdict TaskOutcome { get; set; } public Dictionary OutcomeActions { get; set; } + public bool OverrideDefaultTaskProgression { get; set; } } \ No newline at end of file