diff --git a/src/core/Elsa.Abstractions/Services/ActivityBase.cs b/src/core/Elsa.Abstractions/Services/ActivityBase.cs index beb439670..43e180f70 100644 --- a/src/core/Elsa.Abstractions/Services/ActivityBase.cs +++ b/src/core/Elsa.Abstractions/Services/ActivityBase.cs @@ -2,6 +2,7 @@ using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; +using Elsa.Attributes; using Elsa.Extensions; using Elsa.Models; using Elsa.Results; @@ -12,16 +13,32 @@ using Newtonsoft.Json.Linq; namespace Elsa.Services { public abstract class ActivityBase : IActivity - { + { public JObject State { get; set; } = new JObject(); public Variables Output { get; set; } = new Variables(); - + [JsonIgnore] public Variables TransientOutput { get; } = new Variables(); - + public virtual string Type => GetType().Name; + + [ActivityProperty(Label = "ID", Hint = "Optionally provide a custom ID for this activity. You can then reference this activity from expressions.")] public string Id { get; set; } + [ActivityProperty(Hint = "Optionally provide a custom title for this activity.")] + public string Title + { + get => GetState(); + set => SetState(value); + } + + [ActivityProperty(Hint = "Optionally provide a custom description for this activity.")] + public string Description + { + get => GetState(); + set => SetState(value); + } + public Task CanExecuteAsync(WorkflowExecutionContext context, CancellationToken cancellationToken) => OnCanExecuteAsync(context, cancellationToken); public Task ExecuteAsync(WorkflowExecutionContext context, CancellationToken cancellationToken) => OnExecuteAsync(context, cancellationToken); public Task HaltedAsync(WorkflowExecutionContext context, CancellationToken cancellationToken) => OnHaltedAsync(context, cancellationToken); diff --git a/src/dashboard/Elsa.Dashboard/Areas/Elsa/Views/Shared/_Layout.cshtml b/src/dashboard/Elsa.Dashboard/Areas/Elsa/Views/Shared/_Layout.cshtml index 33740a359..020830b5c 100644 --- a/src/dashboard/Elsa.Dashboard/Areas/Elsa/Views/Shared/_Layout.cshtml +++ b/src/dashboard/Elsa.Dashboard/Areas/Elsa/Views/Shared/_Layout.cshtml @@ -32,8 +32,8 @@ - - + + @await RenderSectionAsync("HeadScripts", false) diff --git a/src/dashboard/Elsa.WorkflowDesigner/ActivityDescriber.cs b/src/dashboard/Elsa.WorkflowDesigner/ActivityDescriber.cs index 3893ef73e..73e2a110c 100644 --- a/src/dashboard/Elsa.WorkflowDesigner/ActivityDescriber.cs +++ b/src/dashboard/Elsa.WorkflowDesigner/ActivityDescriber.cs @@ -61,7 +61,7 @@ namespace Elsa.WorkflowDesigner var activityProperty = propertyInfo.GetCustomAttribute(); if (activityProperty == null) - yield break; + continue; yield return new ActivityPropertyDescriptor (