Astrolabe.Workflow 1.4.1

dotnet add package Astrolabe.Workflow --version 1.4.1
                    
NuGet\Install-Package Astrolabe.Workflow -Version 1.4.1
                    
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="Astrolabe.Workflow" Version="1.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Astrolabe.Workflow" Version="1.4.1" />
                    
Directory.Packages.props
<PackageReference Include="Astrolabe.Workflow" />
                    
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 Astrolabe.Workflow --version 1.4.1
                    
#r "nuget: Astrolabe.Workflow, 1.4.1"
                    
#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 Astrolabe.Workflow@1.4.1
                    
#: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=Astrolabe.Workflow&version=1.4.1
                    
Install as a Cake Addin
#tool nuget:?package=Astrolabe.Workflow&version=1.4.1
                    
Install as a Cake Tool

Astrolabe.Workflow

This library provides abstractions for implementing various tasks which fall under the umbrella of "workflow":

  • Declarative rule based triggering of actions - e.g. automated sending emails
  • Declarative security for user triggered actions - e.g. provide lists of allowed user triggerable actions and secure them if triggered by the user.
  • Encourages efficient bulk operations

The workflow executor

A workflow executor instance is responsible for:

  • Loading data (possibly in bulk)
  • Check rule based triggers and queue up actions
  • Apply the actions which have been user triggered or automatically queued.

The class AbstractWorkflowExecutor<TContext, TLoadContext, TAction> provides a good base for implementing a workflow executor given the 3 type parameters with the following meanings.

TContext

This type needs to carry all the data required for editing a single entity along with any associated entities, e.g. Audit Logs.

TAction

A class which describes all the actions which can be performed, including their parameters if required.

TLoadContext

This class should contain the data required to do a bulk load of data into TContext instances. Usually this is at least a list of id's for the entities to load.

Workflow Rules

TODO

Example

Let's take the contrived example of an app for allowing users to enter the make, model and year of their cars, with draft mode in case you don't want to share your embarrassment with others: (e.g. Hyundai, Accent, 2002).

The database could be mapped by an EF model like this:

using Microsoft.EntityFrameworkCore;

namespace Astrolabe.TestTemplate.Workflow;

public class CarItem
{
    public Guid Id { get; set; }

    public string Owner { get; set; }

    public ItemStatus Status { get; set; }

    /* Editable by the user */

    public string Make { get; set; }

    public string Model { get; set; }

    public int Year { get; set; }
}

public enum ItemStatus
{
    Draft,
    Published,
}

public class AppDbContext : DbContext
{
    public DbSet<CarItem> Cars { get; set; }
}

and the controller could look like this:

using Microsoft.AspNetCore.Mvc;

namespace Astrolabe.TestTemplate.Controllers;

[ApiController]
[Route("api/[controller]")]
public class CarController : ControllerBase
{
    [HttpPost]
    public async Task<Guid> Create([FromBody] CarEdit edit)
    {
        throw new NotImplementedException();
    }

    [HttpPut("{id}")]
    public async Task Edit(Guid id, [FromBody] CarEdit edit)
    {
        throw new NotImplementedException();
    }

    [HttpGet]
    public async Task<IEnumerable<CarEdit>> ListPublished()
    {
        throw new NotImplementedException();
    }
}

public record CarEdit(string Make, string Model, int Year);
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.
  • net8.0

    • No dependencies.

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
1.4.1 71 3/17/2026
1.4.0 69 3/17/2026
1.3.0 824 8/15/2024
1.2.0 200 8/14/2024
1.1.0 175 7/16/2024
1.0.0 525 6/18/2024