WorkflowCore.Dashboard 0.0.3

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

Workflow Core Dashboard

Simple dashboard to visualise Workflow Core state

Note: This is in early development, see the roadmap below

Installation

Install the NuGet package "WorkflowCore.Dashboard"

Using NuGet

PM> Install-Package WorkflowCore.Dashboard

Using .net cli

dotnet add package WorkflowCore.Dashboard

NuGet Version NuGet Downloads

Usage

Add the dashboard to your application by adding AddWorkflowCoreDashboard() and UseWorkflowCoreDashboard():


public void ConfigureServices(IServiceCollection services)
{
	...
    
    // Register with DI container
    services.AddWorkflowCoreDashboard(/*optionally pass in DashboardConfig here*/);
    
    ...
}

public void Configure(IApplicationBuilder app, IWorkflowHost workflowHost)
{
    ...

    // Hook up Workflow Core + register workflows
    workflowHost.RegisterWorkflow<HelloWorldWorkflow>();
    workflowHost.Start();

    // Add dashboard
    app.UseWorkflowCoreDashboard();

    ...
}

By default you can access the dashboard at /wfc-dashboard (this path is configurable, see below)

Configuration

You can pass a DashboardConfig into the UseWorkflowCoreDashboard()

Property Type Default Value Notes
RoutePrefix string /wfc-dashboard Change this if you want to expose the dashboard on a different path
PermissionManager Type (must implement IPermissionManager) AllowLocalAccessPermissionManager Default permissions will only authorize api access for local requests
PermissionManagerLifetime ServiceLifetime If provided, will register the permission manager with the DI container. Otherwise, will assume permission manager will be registered elsewhere

Authorization

By default, the api will authorize access only to local requests, and users will have full access permissions.

You can easily change authorization behaviour by implementing a new IPermissionManager. If you specify a lifetime then it will be registered with the DI container, otherwise it is assumed that it will be registered elsewhere.

Sample Custom IPermissionManager

public class CustomPermissionManager(IMyUserContext userContext) : IPermissionManager {

    public Task<Permission> CurrentPermission()
    {
        var currentUser = await userContext.GetCurrentUser();

        if (currentUser is null) return Permission.None;
        if (currentUser.IsAdministrator()) return Permission.All;

        return Permission.ViewDefinitions;
    }

}
services.AddWorkflowCoreDashboard(new DashboardConfig()
{
	PermissionManager = typeof(CustomPermissionManager),
	PermissionManagerLifetime = ServiceLifetime.Scoped // not required if the IPermissionManager is registered with the DI container elsewhere
};

TODO

Workflow Core Dashboard is in early development. Still todo:

  • More workflow detail, filtering + search capabilities
  • List events, with filtering + search capabilities
  • List errors, with filtering + search capabilities
  • Overview of specific workflow instance. Show current status, step history, state etc
  • Suspend / resume / terminate workflows
  • UI improvements based on user permissions
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
0.0.3 537 10/9/2024
0.0.2 126 10/9/2024
0.0.1 135 9/11/2024