Add ToolVersion field to workflow definition
This commit is contained in:
parent
0eea344406
commit
49da22fb8e
|
|
@ -3,7 +3,7 @@ using Elsa.Api.Client.Extensions;
|
|||
namespace Elsa.Api.Client.Activities;
|
||||
|
||||
/// <summary>
|
||||
/// Represents an activity in a workflow definition.
|
||||
/// Represents an activity.
|
||||
/// </summary>
|
||||
public class Activity : Dictionary<string, object>
|
||||
{
|
||||
|
|
@ -15,6 +15,15 @@ public class Activity : Dictionary<string, object>
|
|||
get => this.TryGetValue<string>("id")!;
|
||||
set => this["id"] = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of this activity.
|
||||
/// </summary>
|
||||
public string? Name
|
||||
{
|
||||
get => this.TryGetValue<string>("name")!;
|
||||
set => this["name"] = value!;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of this activity.
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ public record WorkflowDefinitionModel(
|
|||
string? Description,
|
||||
DateTimeOffset CreatedAt,
|
||||
int Version,
|
||||
Version? ToolVersion,
|
||||
ICollection<VariableDefinition>? Variables,
|
||||
ICollection<InputDefinition>? Inputs,
|
||||
ICollection<OutputDefinition>? Outputs,
|
||||
|
|
@ -59,6 +60,7 @@ public record WorkflowDefinitionModel(
|
|||
default!,
|
||||
default!,
|
||||
default!,
|
||||
default!,
|
||||
default!)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ public interface IActivity
|
|||
/// </summary>
|
||||
string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// An optional name by which the activity can be referenced.
|
||||
/// </summary>
|
||||
string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The logical type name of the activity.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ public abstract class Activity : IActivity, ISignalHandler
|
|||
|
||||
/// <inheritdoc />
|
||||
public string Id { get; set; } = default!;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Type { get; set; }
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ public class WorkflowDefinitionSummary
|
|||
Name = workflowDefinition.Name,
|
||||
Description = workflowDefinition.Description,
|
||||
Version = workflowDefinition.Version,
|
||||
ToolVersion = workflowDefinition.ToolVersion,
|
||||
IsLatest = workflowDefinition.IsLatest,
|
||||
IsPublished = workflowDefinition.IsPublished,
|
||||
ProviderName = workflowDefinition.ProviderName,
|
||||
|
|
@ -51,6 +52,11 @@ public class WorkflowDefinitionSummary
|
|||
/// </summary>
|
||||
public int? Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The version of the tool that created the workflow definition.
|
||||
/// </summary>
|
||||
public Version? ToolVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this is the latest version of the workflow definition.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue