32 lines
951 B
C#
32 lines
951 B
C#
using e_suite.Workflow.Core.Enums;
|
|
using e_suite.Workflow.Core.Interfaces;
|
|
using eSuite.Core.Miscellaneous;
|
|
|
|
namespace e_suite.Workflow.Core;
|
|
|
|
public class WorkflowTemplate
|
|
{
|
|
/// <summary>
|
|
/// Name of the workflow as seen by users, must be unique.
|
|
/// </summary>
|
|
public required string Name { get; set; }
|
|
|
|
}
|
|
|
|
public class WorkflowVersion : IWorkflow
|
|
{
|
|
public required WorkflowTemplate Template { get; set; }
|
|
public ICollection<ITask> Tasks { get; } = new List<ITask>(); //Serialise to Json.
|
|
public required IGeneralIdRef Domain { get; set; }
|
|
public WorkflowState CurrentState { get; set; } = WorkflowState.Pending;
|
|
public required string ActivityNameTemplate { get; set; }
|
|
public string Description { get; set; } = string.Empty;
|
|
public bool Paused { get; } = false;
|
|
public async Task OnActivateAsync()
|
|
{
|
|
}
|
|
|
|
public async Task OnCompleteAsync()
|
|
{
|
|
}
|
|
} |