YMJake.Flowable.ExternalWorker.Client 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package YMJake.Flowable.ExternalWorker.Client --version 1.0.0
                    
NuGet\Install-Package YMJake.Flowable.ExternalWorker.Client -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YMJake.Flowable.ExternalWorker.Client" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YMJake.Flowable.ExternalWorker.Client" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="YMJake.Flowable.ExternalWorker.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YMJake.Flowable.ExternalWorker.Client --version 1.0.0
                    
#r "nuget: YMJake.Flowable.ExternalWorker.Client, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YMJake.Flowable.ExternalWorker.Client@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YMJake.Flowable.ExternalWorker.Client&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=YMJake.Flowable.ExternalWorker.Client&version=1.0.0
                    
Install as a Cake Tool

Flowable External Worker Client for .NET

License

A .NET client library for Flowable External Workers with ASP.NET Core integration and pipeline-based configuration.

Installation

dotnet add package Flowable.ExternalWorker.Client

Quick Start

Configuration

{
  "FlowableExternalWorker": {
    "FlowableHost": "http://localhost:8091/flowable-work",
    "BasicAuthUsername": "rest-admin",
    "BasicAuthPassword": "test",
    "DefaultConcurrency": 2,
    "DefaultPollingIntervalSeconds": 15,
    "DefaultNumberOfTasks": 3,
    "DefaultLockDuration": "PT10M"
  }
}

Setup

// Program.cs
builder.Services.AddFlowableExternalWorker(options =>
{
    builder.Configuration.GetSection("FlowableExternalWorker").Bind(options);
});

// Register handlers
builder.Services.AddScoped<OrderProcessingHandler>();

// Configure workers with pipeline
builder.Services.AddFlowableWorker("processOrder")
    .AddHandler<OrderProcessingHandler>()
    .WithConcurrency(3)
    .WithPollingInterval(TimeSpan.FromSeconds(10));

Worker Implementation

Basic Handler
public class OrderProcessingHandler : IWorkerHandler
{
    private readonly ILogger<OrderProcessingHandler> _logger;

    public OrderProcessingHandler(ILogger<OrderProcessingHandler> logger) => _logger = logger;

    public async Task HandleAsync(IWorkerPipelineContext context)
    {
        _logger.LogInformation("Processing order {OrderId}", context.Job.Id);
        
        var customerId = context.Job.Variables.GetValueOrDefault("customerId");
        // Your business logic here
        
        await Task.Delay(1000, context.CancellationToken);
        
        context.Result = context.ResultBuilder.Success()
            .Variable("processedAt", DateTime.UtcNow)
            .Variable("status", "completed");
        
        _logger.LogInformation("Order processed successfully");
    }
}
Handler with Error Handling
public class PaymentValidationHandler : IWorkerHandler
{
    private readonly ILogger<PaymentValidationHandler> _logger;

    public PaymentValidationHandler(ILogger<PaymentValidationHandler> logger) => _logger = logger;

    public async Task HandleAsync(IWorkerPipelineContext context)
    {
        try
        {
            var amount = Convert.ToDecimal(context.Job.Variables.GetValueOrDefault("amount", 0));
            
            if (amount <= 0)
            {
                context.Result = context.ResultBuilder.Failure()
                    .WithMessage("Invalid payment amount")
                    .WithDetails($"Amount must be > 0, was {amount}")
                    .WithRetries(0);
                return;
            }
            
            if (amount > 10000)
            {
                context.Result = context.ResultBuilder.BpmnError("AMOUNT_TOO_HIGH")
                    .Variable("maxAllowed", 10000);
                return;
            }
            
            // Simulate validation
            await Task.Delay(500, context.CancellationToken);
            
            context.Result = context.ResultBuilder.Success()
                .Variable("validatedAt", DateTime.UtcNow)
                .Variable("validatedAmount", amount);
        }
        catch (Exception ex)
        {
            context.Result = context.ResultBuilder.Failure().Error(ex);
        }
    }
}

// Configure with middleware (optional)
builder.Services.AddFlowableWorker("validatePayment")
    .AddHandler<PaymentValidationHandler>()
    .WithConcurrency(2)
    .ConfigurePipeline(pipeline =>
    {
        // Add simple logging middleware
        pipeline.Use(next => async context =>
        {
            var logger = context.ServiceProvider.GetRequiredService<ILogger<PaymentValidationHandler>>();
            logger.LogInformation("Processing {JobId}", context.Job.Id);
            
            await next(context);
            
            logger.LogInformation("Completed {JobId}", context.Job.Id);
        });
    });

Features

  • 🎯 Simple worker configuration with fluent API
  • 🔧 Native ASP.NET Core integration and dependency injection
  • 💪 Strong typing with full IntelliSense support
  • 📝 Easy variable access with extension methods
  • ⚡ Concurrent worker processing with configurable concurrency
  • 🔄 Built-in error handling and retry mechanisms
  • 🎛️ Optional middleware pipeline for advanced scenarios
  • ⚙️ Per-worker configuration options

License

Apache License 2.0

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated