Move work on workflows
This commit is contained in:
parent
aa4864a0bf
commit
737d3e4d08
@ -42,6 +42,11 @@ builder.Services.AddControllersWithViews()
|
|||||||
.AddJsonOptions(options =>
|
.AddJsonOptions(options =>
|
||||||
{
|
{
|
||||||
options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
|
options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
|
||||||
|
//todo add support for OneOf
|
||||||
|
//Add the OneOf nuget package, before uncommenting this, to allow properties to be mapped to public Oneof<string,int> test {get;set;}
|
||||||
|
//options.JsonSerializerOptions.Converters.Add(new OneOf.OneOfJsonConverter());//todo add support for OneOf
|
||||||
|
//Add the OneOf nuget package, before uncommenting this, to allow properties to be mapped to public Oneof<string,int> test {get;set;}
|
||||||
|
//options.JsonSerializerOptions.Converters.Add(new OneOf.OneOfJsonConverter());
|
||||||
options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
|
options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
|
||||||
});
|
});
|
||||||
builder.AddSwagger();
|
builder.AddSwagger();
|
||||||
|
|||||||
10
e-suite.Workflow.Core/Interfaces/IFormTemplate.cs
Normal file
10
e-suite.Workflow.Core/Interfaces/IFormTemplate.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using e_suite.Workflow.Core.Attributes;
|
||||||
|
|
||||||
|
namespace e_suite.Workflow.Core.Interfaces;
|
||||||
|
|
||||||
|
[TaskCapability]
|
||||||
|
public interface IFormTemplate
|
||||||
|
{
|
||||||
|
public bool IsMultiple { get; set; }
|
||||||
|
IEnumerable<string> ValidateForTemplate();
|
||||||
|
}
|
||||||
@ -1,5 +1,8 @@
|
|||||||
namespace e_suite.Workflow.Core.Interfaces;
|
using e_suite.Workflow.Core.Attributes;
|
||||||
|
|
||||||
|
namespace e_suite.Workflow.Core.Interfaces;
|
||||||
|
|
||||||
|
[TaskCapability]
|
||||||
public interface ITask
|
public interface ITask
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -25,7 +28,7 @@ public interface ITask
|
|||||||
/// <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>
|
||||||
ITask? Predecessor { get; set; }
|
List<ITask> Predecessors { get; set; }
|
||||||
|
|
||||||
//Todo can only be on a run-time instance
|
//Todo can only be on a run-time instance
|
||||||
///// <summary>
|
///// <summary>
|
||||||
|
|||||||
@ -9,7 +9,7 @@ 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 ITask? Predecessor { 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;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using e_suite.Workflow.Core.Attributes;
|
using e_suite.Workflow.Core.Attributes;
|
||||||
|
using e_suite.Workflow.Core.Interfaces;
|
||||||
|
|
||||||
namespace e_suite.Workflow.Core.Tasks;
|
namespace e_suite.Workflow.Core.Tasks;
|
||||||
|
|
||||||
@ -7,7 +8,7 @@ namespace e_suite.Workflow.Core.Tasks;
|
|||||||
/// A user has to open this task, manually set it to ready to complete
|
/// A user has to open this task, manually set it to ready to complete
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[GeneralTask]
|
[GeneralTask]
|
||||||
public class BasicTask : TaskBase
|
public class BasicTask : TaskBase, IAssignees<ITaskAssignee>
|
||||||
{
|
{
|
||||||
|
public IList<ITaskAssignee> Assignees { get; }
|
||||||
}
|
}
|
||||||
@ -4,19 +4,11 @@ using eSuite.Core.Miscellaneous;
|
|||||||
|
|
||||||
namespace e_suite.Workflow.Core.Tasks;
|
namespace e_suite.Workflow.Core.Tasks;
|
||||||
|
|
||||||
public interface ITemplateValidatable
|
|
||||||
{
|
|
||||||
IEnumerable<string> ValidateForTemplate();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[GeneralTask]
|
[GeneralTask]
|
||||||
public class FormDataInputTask : TaskBase, IAssignees<ITaskAssignee>, ITemplateValidatable
|
public class FormDataInputTask : TaskBase, IAssignees<ITaskAssignee>, IFormTemplate
|
||||||
{
|
{
|
||||||
public IList<ITaskAssignee> Assignees { get; } = new List<ITaskAssignee>();
|
public IList<ITaskAssignee> Assignees { get; } = new List<ITaskAssignee>();
|
||||||
public bool IsMultiple { get; set; }
|
public bool IsMultiple { get; set; }
|
||||||
public bool ContainsDecision { get; set; }
|
|
||||||
public required IGeneralIdRef FormIdRef { get; set; }
|
public required IGeneralIdRef FormIdRef { get; set; }
|
||||||
|
|
||||||
public IEnumerable<string> ValidateForTemplate()
|
public IEnumerable<string> ValidateForTemplate()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user