Update WorkflowBlueprint with Tag

This commit is contained in:
Sipke Schoorstra 2021-04-26 12:30:15 +02:00
parent 5cab199944
commit 27b008fd05
4 changed files with 14 additions and 0 deletions

View file

@ -9,6 +9,7 @@ namespace Elsa.Services.Models
bool IsSingleton { get; }
bool IsPublished { get; }
bool IsLatest { get; }
string? Tag { get; }
/// <summary>
/// An initial set of variables available to workflow instances.

View file

@ -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; }

View file

@ -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,

View file

@ -53,6 +53,7 @@ namespace Elsa.Services
workflowDefinition.Description,
workflowDefinition.IsLatest,
workflowDefinition.IsPublished,
workflowDefinition.Tag,
workflowDefinition.Variables,
workflowDefinition.CustomAttributes,
workflowDefinition.ContextOptions,