Renamed the TaskEditor attribute to TaskCapability as this is a more descriptive name for it.
This commit is contained in:
parent
cbee1422b4
commit
aa4864a0bf
@ -6,10 +6,11 @@ using e_suite.Database.Core.Extensions;
|
||||
using e_suite.Modules.WorkflowTemplatesManager.Repository;
|
||||
using e_suite.Utilities.Pagination;
|
||||
using e_suite.Workflow.Core.Attributes;
|
||||
using eSuite.Core.Miscellaneous;
|
||||
using System.Linq.Expressions;
|
||||
using e_suite.Workflow.Core.Extensions;
|
||||
using e_suite.Workflow.Core.Interfaces;
|
||||
using eSuite.Core.Miscellaneous;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
|
||||
//using WorkflowVersion = e_suite.Workflow.Core.WorkflowVersion;
|
||||
|
||||
@ -180,10 +181,7 @@ public class WorkflowTemplateManager : IWorkflowTemplateManager
|
||||
{
|
||||
var interfaces = t.GetInterfaces();
|
||||
var capabilities = interfaces
|
||||
.Where(i =>
|
||||
i != typeof(ITask) &&
|
||||
i.Namespace?.StartsWith("e_suite.Workflow") == true // avoid system interfaces
|
||||
)
|
||||
.Where(i => i.GetCustomAttribute<TaskCapabilityAttribute>() != null)
|
||||
.Select(FormatInterfaceName)
|
||||
.ToList();
|
||||
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
namespace e_suite.Workflow.Core.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Interface)]
|
||||
public sealed class TaskCapabilityAttribute : Attribute
|
||||
{
|
||||
}
|
||||
@ -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 IApprovalTaskAssignee : ITaskAssignee, IBypassable
|
||||
{
|
||||
public bool AllowNoVerdict { get; set; }
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using e_suite.Workflow.Core.Attributes;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace e_suite.Workflow.Core.Interfaces;
|
||||
|
||||
[TaskCapability]
|
||||
public interface IAssignees<T> where T : ITaskAssignee
|
||||
{
|
||||
[Required]
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
using e_suite.Workflow.Core.Enums;
|
||||
using e_suite.Workflow.Core.Attributes;
|
||||
using e_suite.Workflow.Core.Enums;
|
||||
|
||||
namespace e_suite.Workflow.Core.Interfaces;
|
||||
|
||||
[TaskCapability]
|
||||
public interface IBudget
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@ -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 IBypassable
|
||||
{
|
||||
public bool Bypassable { get; set; }
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using e_suite.Workflow.Core.Attributes;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace e_suite.Workflow.Core.Interfaces;
|
||||
|
||||
[TaskCapability]
|
||||
public interface IFailedLoopback
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@ -3,6 +3,7 @@ using e_suite.Workflow.Core.Attributes;
|
||||
|
||||
namespace e_suite.Workflow.Core.Interfaces;
|
||||
|
||||
[TaskCapability]
|
||||
public interface IStage<T> where T : TaskTypeAttribute
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@ -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 ITags
|
||||
{
|
||||
public IList<string> Tags { get; set; }
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
using e_suite.Database.Core.Tables.Contacts;
|
||||
using e_suite.Database.Core.Tables.Domain;
|
||||
using e_suite.Workflow.Core.Attributes;
|
||||
using e_suite.Workflow.Core.Enums;
|
||||
|
||||
namespace e_suite.Workflow.Core.Interfaces;
|
||||
|
||||
[TaskCapability]
|
||||
public interface ITaskAssignee
|
||||
{
|
||||
public Role? Role { get; set; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user