Replaced direct implementation of `IPropertyUIHandler` with a new `PropertyUIHandlerBase` abstract class to simplify UI handler management and introduce a priority mechanism. Removed outdated `SampleWorkflow` and `SlowActivity` code to clean up the repository. Introduced a custom checklist options provider and registered it within the application services.
19 lines
571 B
C#
19 lines
571 B
C#
using Elsa.Extensions;
|
|
using Elsa.Workflows;
|
|
using Elsa.Workflows.Attributes;
|
|
using Elsa.Workflows.Models;
|
|
using Elsa.Workflows.UIHints;
|
|
using Elsa.Workflows.UIHints.CheckList;
|
|
|
|
namespace Elsa.Server.Web.Activities;
|
|
|
|
public class CheckedActivity : CodeActivity<string[]>
|
|
{
|
|
[Input(UIHint = InputUIHints.CheckList, UIHandler = typeof(CustomCheckListOptionsProvider))]
|
|
public Input<string[]> CheckedItems { get; set; }
|
|
|
|
protected override void Execute(ActivityExecutionContext context)
|
|
{
|
|
context.SetResult(CheckedItems.GetOrDefault(context));
|
|
}
|
|
} |