Fleans.Worker
0.5.0
dotnet add package Fleans.Worker --version 0.5.0
NuGet\Install-Package Fleans.Worker -Version 0.5.0
<PackageReference Include="Fleans.Worker" Version="0.5.0" />
<PackageVersion Include="Fleans.Worker" Version="0.5.0" />
<PackageReference Include="Fleans.Worker" />
paket add Fleans.Worker --version 0.5.0
#r "nuget: Fleans.Worker, 0.5.0"
#:package Fleans.Worker@0.5.0
#addin nuget:?package=Fleans.Worker&version=0.5.0
#tool nuget:?package=Fleans.Worker&version=0.5.0
Fleans.Worker
Orleans worker-side primitives for Fleans plugin authors. Use this package when you want to
implement a custom BPMN service-task plugin: it provides CustomTaskHandlerBase, the
[WorkerPlacement] attribute, and the placement directors that route worker grains onto
silos with Fleans:Role=Worker (or Combined).
Dependency closure
Fleans.Worker → Fleans.Application.Abstractions → Fleans.Domain.Abstractions
True leaf — depends only on Fleans.Application.Abstractions + Orleans SDK packages. No
reference to Fleans.Application, Fleans.Domain, Fleans.Infrastructure, or any
persistence project. Plugin authors get the surface they need with none of the engine
internals.
Minimum consumer usage
public sealed class MyHandler : CustomTaskHandlerBase
{
public MyHandler(ILogger<MyHandler> logger, IGrainFactory factory) : base(logger, factory) { }
protected override string TaskType => "my-task";
protected override Task<IDictionary<string, object?>> ExecuteAsync(
IDictionary<string, object?> resolvedInputs,
ExpandoObject variables,
CustomTaskExecutionContext context,
CancellationToken cancellationToken)
{
// your work here
return Task.FromResult<IDictionary<string, object?>>(new Dictionary<string, object?>
{
["__response"] = new { ok = true }
});
}
}
public static class MyPluginRegistration
{
public static IServiceCollection AddMyPlugin(this IServiceCollection services) =>
services.AddCustomTaskPlugin<MyHandler>(taskType: "my-task", displayName: "My Task");
}
Plugin packages share the engine's
<VersionPrefix>track — every Fleans release bumps every plugin's NuGet version even when the plugin source is bit-identical (same precedent asAspire.Hosting.*/Microsoft.Orleans.*).
See Fleans documentation for the
full plugin-authoring guide and the Fleans.CustomWorkerHost
worked example for hosting plugins outside the engine repo.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Fleans.Application.Abstractions (>= 0.5.0)
- Microsoft.Orleans.Runtime (>= 10.0.1)
- Microsoft.Orleans.Sdk (>= 10.0.1)
- Microsoft.Orleans.Streaming (>= 10.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Fleans.Worker:
| Package | Downloads |
|---|---|
|
Fleans.Plugins.RestCaller
Fleans REST caller plugin — backs <serviceTask type="rest-call"> with an HTTP request. |
GitHub repositories
This package is not used by any popular GitHub repositories.