using e_suite.Workflow.Core.Enums; namespace e_suite.Workflow.Core.Interfaces; public interface ITask { /// /// The guid identifying this task. /// Guid Guid { get; set; } /// /// ID of the parent of this task. It could be either a Task or a Workflow. /// ITask Parent { get; set; } /// /// Name of the task as seen by users, must be unique in the workflow. /// string Name { get; set; } /// /// Description of the task /// string Description { get; set; } /// /// List of tasks that need to be completed before this on can start. (If empty, will start when the workflow starts) /// IList Predecessors { get; } /// /// units of work involved in this item (UoW is a business term in this context) /// public decimal UnitsOfWork { get; set; } /// /// Cost of this work item /// public Cost Cost { get; set; } /// /// The option to show in budget. /// public BudgetOption BudgetOption { get; set; } /// /// Time tracking of this item /// public bool AllowTimeTracking { get; set; } /// /// Priority of this item /// public Priority Priority { get; set; } /// /// alloted duration of this item. /// public TimeSpan Duration { get; set; } public IList Tags { get; set; } //Todo can only be on a run-time instance ///// ///// Called when the task status has been progressed from Pending to Active. ///// ///// Note: You can use this method to set the TaskStatus to ReadyToComplete if there is no manual processing needed for this task. ///// After this method is completed, the TaskStatus must be either Active or ReadyToComplete. ///// ///// //Task OnActivateAsync(); ///// ///// Called when the task status has been progressed from ReadyToComplete to Completed ///// ///// True when the task completes successfully, false when it is considered failed. //Task OnCompleteAsync(); //Todo add support for events (soap, rest, sftp, e-mail) }