diff --git a/src/core/Elsa.Abstractions/Services/Models/IWorkflowBlueprint.cs b/src/core/Elsa.Abstractions/Services/Models/IWorkflowBlueprint.cs index a4431d250..bf8b6d79f 100644 --- a/src/core/Elsa.Abstractions/Services/Models/IWorkflowBlueprint.cs +++ b/src/core/Elsa.Abstractions/Services/Models/IWorkflowBlueprint.cs @@ -9,6 +9,7 @@ namespace Elsa.Services.Models bool IsSingleton { get; } bool IsPublished { get; } bool IsLatest { get; } + string? Tag { get; } /// /// An initial set of variables available to workflow instances. diff --git a/src/core/Elsa.Abstractions/Services/Models/WorkflowBlueprint.cs b/src/core/Elsa.Abstractions/Services/Models/WorkflowBlueprint.cs index 2efc1821d..00414d40e 100644 --- a/src/core/Elsa.Abstractions/Services/Models/WorkflowBlueprint.cs +++ b/src/core/Elsa.Abstractions/Services/Models/WorkflowBlueprint.cs @@ -23,6 +23,7 @@ namespace Elsa.Services.Models string? description, bool isLatest, bool isPublished, + string? tag, Variables? variables, Variables? customAttributes, WorkflowContextOptions? contextOptions, @@ -39,6 +40,7 @@ namespace Elsa.Services.Models IsSingleton = isSingleton; IsLatest = isLatest; IsPublished = isPublished; + Tag = tag; ContextOptions = contextOptions; Variables = variables ?? new Variables(); CustomAttributes = customAttributes ?? new Variables(); @@ -55,6 +57,7 @@ namespace Elsa.Services.Models public bool IsSingleton { get; set; } public bool IsPublished { get; set; } public bool IsLatest { get; set; } + public string? Tag { get; set; } public Variables Variables { get; set; } public WorkflowContextOptions? ContextOptions { get; set; } public WorkflowPersistenceBehavior PersistenceBehavior { get; set; } diff --git a/src/core/Elsa.Core/Builders/WorkflowBuilder.cs b/src/core/Elsa.Core/Builders/WorkflowBuilder.cs index 445bbe704..cfa41ee51 100644 --- a/src/core/Elsa.Core/Builders/WorkflowBuilder.cs +++ b/src/core/Elsa.Core/Builders/WorkflowBuilder.cs @@ -5,6 +5,7 @@ using Elsa.Models; using Elsa.Services; using Elsa.Services.Models; using Microsoft.Extensions.DependencyInjection; +using Storage.Net.Blobs; namespace Elsa.Builders { @@ -26,6 +27,7 @@ namespace Elsa.Builders public int Version { get; private set; } public string? TenantId { get; private set; } public bool IsSingleton { get; private set; } + public string? Tag { get; private set; } public Variables Variables { get; } public Variables CustomAttributes { get; } @@ -78,6 +80,12 @@ namespace Elsa.Builders Version = value; return this; } + + public IWorkflowBuilder WithTag(string value) + { + Tag = value; + return this; + } public IWorkflowBuilder AsSingleton() { @@ -155,6 +163,7 @@ namespace Elsa.Builders Description, true, true, + Tag, Variables, CustomAttributes, ContextOptions, diff --git a/src/core/Elsa.Core/Services/WorkflowBlueprintMaterializer.cs b/src/core/Elsa.Core/Services/WorkflowBlueprintMaterializer.cs index d0cb297c0..24aaf98a8 100644 --- a/src/core/Elsa.Core/Services/WorkflowBlueprintMaterializer.cs +++ b/src/core/Elsa.Core/Services/WorkflowBlueprintMaterializer.cs @@ -53,6 +53,7 @@ namespace Elsa.Services workflowDefinition.Description, workflowDefinition.IsLatest, workflowDefinition.IsPublished, + workflowDefinition.Tag, workflowDefinition.Variables, workflowDefinition.CustomAttributes, workflowDefinition.ContextOptions,