Moved the duration to ITask, so it's common to everything.
More work on the ApprovalTask, IOutcome<T> should now be working.
This commit is contained in:
parent
052b833dd6
commit
800f10f9fb
@ -30,9 +30,4 @@ public interface IBudget
|
|||||||
/// Priority of this item
|
/// Priority of this item
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Priority Priority { get; set; }
|
public Priority Priority { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// alloted duration of this item.
|
|
||||||
/// </summary>
|
|
||||||
public TimeSpan Duration { get; set; }
|
|
||||||
}
|
}
|
||||||
@ -9,4 +9,5 @@ public interface IOutcome<T>
|
|||||||
//public T? TaskOutcome { get; set; }
|
//public T? TaskOutcome { get; set; }
|
||||||
|
|
||||||
Dictionary<T, Guid> OutcomeActions { get; set; }
|
Dictionary<T, Guid> OutcomeActions { get; set; }
|
||||||
|
bool OverrideDefaultTaskProgression { get; set; }
|
||||||
}
|
}
|
||||||
@ -25,6 +25,11 @@ public interface ITask
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
string Description { get; set; }
|
string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// alloted duration of this item.
|
||||||
|
/// </summary>
|
||||||
|
public TimeSpan Duration { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// List of tasks that need to be completed before this on can start. (If empty, will start when the workflow starts)
|
/// List of tasks that need to be completed before this on can start. (If empty, will start when the workflow starts)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -9,13 +9,14 @@ public abstract class TaskBase : ITask, IBudget, ITags
|
|||||||
public required ITask Parent { get; set; }
|
public required ITask Parent { get; set; }
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public string Description { get; set; } = string.Empty;
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public required TimeSpan Duration { get; set; }
|
||||||
public List<ITask> Predecessors { get; set; } = [];
|
public List<ITask> Predecessors { get; set; } = [];
|
||||||
public decimal UnitsOfWork { get; set; } = 1;
|
public decimal UnitsOfWork { get; set; } = 1;
|
||||||
public required Cost Cost { get; set; }
|
public required Cost Cost { get; set; }
|
||||||
public BudgetOption BudgetOption { get; set; } = BudgetOption.DoNotShow;
|
public BudgetOption BudgetOption { get; set; } = BudgetOption.DoNotShow;
|
||||||
public bool AllowTimeTracking { get; set; } = true;
|
public bool AllowTimeTracking { get; set; } = true;
|
||||||
public Priority Priority { get; set; } = Priority.Normal;
|
public Priority Priority { get; set; } = Priority.Normal;
|
||||||
public required TimeSpan Duration { get; set; }
|
|
||||||
public IList<string> Tags { get; set; } = new List<string>();
|
public IList<string> Tags { get; set; } = new List<string>();
|
||||||
|
|
||||||
//Todo can only be on a run-time instance
|
//Todo can only be on a run-time instance
|
||||||
|
|||||||
@ -10,4 +10,5 @@ public class AdhocApprovalTask : TaskBase, IAssignees<IApprovalTaskAssignee>, IO
|
|||||||
public IList<IApprovalTaskAssignee> Assignees { get; } = new List<IApprovalTaskAssignee>();
|
public IList<IApprovalTaskAssignee> Assignees { get; } = new List<IApprovalTaskAssignee>();
|
||||||
public ApprovalVerdict TaskOutcome { get; set; }
|
public ApprovalVerdict TaskOutcome { get; set; }
|
||||||
public Dictionary<ApprovalVerdict, Guid> OutcomeActions { get; set; }
|
public Dictionary<ApprovalVerdict, Guid> OutcomeActions { get; set; }
|
||||||
|
public bool OverrideDefaultTaskProgression { get; set; }
|
||||||
}
|
}
|
||||||
@ -10,4 +10,5 @@ public class ApprovalTask : TaskBase, IStage<ApprovalTaskAttribute>, IOutcome<Ap
|
|||||||
public ICollection<ITask> Tasks { get; } = new List<ITask>();
|
public ICollection<ITask> Tasks { get; } = new List<ITask>();
|
||||||
public ApprovalVerdict TaskOutcome { get; set; }
|
public ApprovalVerdict TaskOutcome { get; set; }
|
||||||
public Dictionary<ApprovalVerdict, Guid> OutcomeActions { get; set; }
|
public Dictionary<ApprovalVerdict, Guid> OutcomeActions { get; set; }
|
||||||
|
public bool OverrideDefaultTaskProgression { get; set; }
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user