elsa-core/src/apps/Elsa.Server.Web/Activities/CheckedActivity.cs
Sipke Schoorstra 892099c235 Refactor UI handler hierarchy and remove sample workflows.
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.
2025-05-26 20:06:39 +02:00

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