Wexflow 9.8.0
dotnet add package Wexflow --version 9.8.0
NuGet\Install-Package Wexflow -Version 9.8.0
<PackageReference Include="Wexflow" Version="9.8.0" />
<PackageVersion Include="Wexflow" Version="9.8.0" />
<PackageReference Include="Wexflow" />
paket add Wexflow --version 9.8.0
#r "nuget: Wexflow, 9.8.0"
#:package Wexflow@9.8.0
#addin nuget:?package=Wexflow&version=9.8.0
#tool nuget:?package=Wexflow&version=9.8.0
Wexflow
Core assembly of the Wexflow workflow engine
This NuGet package provides the core components needed to build and extend workflows in Wexflow, a powerful and extensible open-source workflow automation engine.
Use this package to create custom tasks that can be integrated into your workflows. It includes the base Task
class, logging, execution helpers, and utility functions.
Full documentation for creating custom tasks is available here.
Features
- Base class for building custom workflow tasks
- Integrated logging and task lifecycle management
- Supports both async (
RunAsync
) and sync (Run
) task execution - Compatible with all Wexflow editions .NET Framework 4.8 (Legacy) and .NET 8.0+ (Stable)
- Cross-platform: Windows, Linux, macOS
Installation
To install via .NET CLI:
dotnet add package Wexflow
Or via NuGet Package Manager:
Install-Package Wexflow
Quick Links
- Download Latest Release
- Install Guide
- Getting Started
- Configuration Guide
- REST API Reference
- Built-in Tasks
- Custom Tasks
Example: Creating a Custom Task
To define your own task, inherit from the Task
class and override either RunAsync
(asynchronous) orRun
(synchronous).
Example using RunAsync
If you want to use async/await
functionality, override RunAsync
instead of Run
. Here's a simple example of a custom task:
using System;
using System.Xml.Linq;
using Wexflow.Core;
namespace Wexflow.Tasks.MyTask
{
public class MyTask : Task
{
public MyTask(XElement xe, Workflow wf) : base(xe, wf)
{
// Initialize task settings from the XML element if needed.
// Example: string settingValue = GetSetting("mySetting");
}
public async override System.Threading.Tasks.Task<TaskStatus> RunAsync()
{
try
{
// Check for workflow cancellation at the start of execution.
// Always include this check in any long-running or looped logic.
Workflow.CancellationTokenSource.Token.ThrowIfCancellationRequested();
// Main task logic goes here.
Info("Running my custom task...");
// Simulate work using asynchronous delay.
await System.Threading.Tasks.Task.Delay(2000);
// Support workflow suspension. This call will block if the workflow is paused.
// Only call WaitOne if cancellation hasn't already been requested.
if (!Workflow.CancellationTokenSource.Token.IsCancellationRequested)
{
WaitOne();
}
// Return success when the task completes successfully
return new TaskStatus(Status.Success);
}
catch (OperationCanceledException)
{
// Don't suppress this exception; it allows proper workflow stop handling.
throw;
}
catch (Exception ex)
{
// Log unexpected errors and return error status.
ErrorFormat("An error occurred while executing the task.", ex);
return new TaskStatus(Status.Error);
}
}
}
}
Example using Run
If you don't need async/await
functionality, you can use the synchronous Run
method instead. Here's how the same task would look using Run
:
using System.Xml.Linq;
using Wexflow.Core;
using Task = Wexflow.Core.Task;
using TaskStatus = Wexflow.Core.TaskStatus;
namespace Wexflow.Tasks.MyTask
{
public class MyTask : Task
{
public MyTask(XElement xe, Workflow wf) : base(xe, wf)
{
// Initialize task settings from the XML element if needed
// Example: string settingValue = GetSetting("mySetting");
}
public override TaskStatus Run()
{
try
{
// Check for workflow cancellation at the start of execution.
// Always include this check in any long-running or looped logic.
// Required for .NET 8.0+ stable version.
Workflow.CancellationTokenSource.Token.ThrowIfCancellationRequested();
// Main task logic goes here.
Info("Running my custom task...");
// WaitOne() enables suspend/resume support in .NET 8.0+.
// Call this to pause the task when the workflow is suspended.
// Only call WaitOne if cancellation hasn't already been requested.
if (!Workflow.CancellationTokenSource.Token.IsCancellationRequested)
{
WaitOne();
}
// Return success when the task completes successfully
return new TaskStatus(Status.Success);
}
catch (ThreadInterruptedException)
{
// Required for .NET 4.8 legacy version.
// Don't suppress this exception; it allows proper workflow stop handling.
throw;
}
catch (OperationCanceledException)
{
// Required for .NET 8.0+ stable version.
// Don't suppress this exception; it allows proper workflow stop handling.
throw;
}
catch (Exception ex)
{
// Log unexpected errors and return error status.
ErrorFormat("An error occurred while executing the task.", ex);
return new TaskStatus(Status.Error);
}
}
}
}
Need a starting point?
For .NET Framework 4.8 (Legacy), you can find a complete example of a custom task here:
Wexflow.Tasks.Template (.NET 4.8)For .NET 8.0+ (Stable), check out the full example here:
Wexflow.Tasks.Template (.NET 8.0+)
Installing Your Custom Task in Wexflow
.NET Framework 4.8 (Legacy)
Once you've finished coding your custom task, compile the class library project and copy the Wexflow.Tasks.MyTask.dll
assembly into one of the following folders:
C:\Program Files\Wexflow\
C:\Wexflow\Tasks\
(default for Wexflow .NET 4.8 version)
The Tasks
folder path can be configured via the tasksFolder
setting in the configuration file: C:\Wexflow\Wexflow.xml
Important: The namespace and DLL filename of your task must start with Wexflow.Tasks
.
.NET 8.0+ (Stable)
If you're using the .NET 8.0+ version of Wexflow, copy Wexflow.Tasks.MyTask.dll
to the appropriate platform-specific folder:
- Windows:
.\Wexflow.Server
orC:\Wexflow-netcore\Tasks
- Linux:
/opt/wexflow/Wexflow.Server
or/opt/wexflow/Wexflow/Tasks
- macOS:
/Applications/wexflow/Wexflow.Server
or/Applications/wexflow/Wexflow/Tasks
Referenced Assemblies
If your custom task depends on additional assemblies (DLLs), copy them as follows:
- .NET 4.8:
C:\Program Files\Wexflow\
- .NET 8.0+:
- Windows:
.\Wexflow.Server
orC:\Wexflow-netcore\Tasks
- Linux:
/opt/wexflow/Wexflow.Server
or/opt/wexflow/Wexflow/Tasks
- macOS:
/Applications/wexflow/Wexflow.Server
or/Applications/wexflow/Wexflow/Tasks
- Windows:
Updating a Custom Task
To update an existing custom task:
- Stop Wexflow Server
- Replace the old DLL and its referenced assemblies with the new versions in the correct folder.
- Start Wexflow Server:
- .NET 4.8: Start the Wexflow Windows Service
- .NET 8.0+:
- Windows: Run
.\run.bat
or start Wexflow Service if you installed it as a Windows Service - Linux: Run
sudo systemctl start wexflow
- macOS: Run
dotnet /Applications/wexflow/Wexflow.Server/Wexflow.Server.dll
- Windows: Run
Using Your Custom Task
Once installed, your task can be used in workflows like this:
<Task id="$int" name="MyTask" description="My task description" enabled="true">
<Setting name="settingName" value="settingValue" />
</Task>
Important: Make sure the name
attribute matches the class name of your task (e.g., MyTask
).
You can also define settings for your task using the <Setting>
elements, which can be accessed in your task code via:
string settingValue = this.GetSetting("settingName");
string settingValue = this.GetSetting("settingName", defaultValue);
string[] settingValues = this.GetSettings("settingName");
bool settingValue = this.GetSettingBool("settingName", defaultValue);
int settingValue = this.GetSettingInt("settingName", defaultValue);
int[] settingValues = this.GetSettingsInt("settingName", defaultValue);
You can then test your custom task by creating a new workflow using either the Designer or the XML editor.
Example using the XML editor:
<Workflow xmlns="urn:wexflow-schema" id="99" name="Workflow_MyWorkflow" description="Workflow_MyWorkflow">
<Settings>
<Setting name="launchType" value="trigger" />
<Setting name="enabled" value="true" />
</Settings>
<Tasks>
<Task id="1" name="MyTask" description="My task description" enabled="true">
<Setting name="settingName" value="settingValue" />
</Task>
</Tasks>
</Workflow>
This workflow will appear in the Wexflow Manager. You can launch and monitor it from there.
That's it! You're now ready to create, install, and run your own custom tasks in Wexflow.
Support & Contribution
For issues, contributions, or updates, visit the Wexflow GitHub repository.
Product | Versions 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 is compatible. 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. |
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- log4net (>= 3.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 2.1.1)
- Quartz (>= 3.14.0)
- System.Buffers (>= 4.5.1)
- System.Diagnostics.DiagnosticSource (>= 4.7.1)
- System.Memory (>= 4.5.4)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 4.5.3)
-
net8.0
- log4net (>= 3.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 2.1.1)
- Microsoft.NETCore.Platforms (>= 2.0.0)
- Quartz (>= 3.14.0)
- Quartz.Serialization.Json (>= 3.14.0)
- System.Buffers (>= 4.5.1)
- System.Configuration.ConfigurationManager (>= 4.5.0)
- System.Diagnostics.DiagnosticSource (>= 4.7.1)
- System.Memory (>= 4.5.4)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 4.5.3)
- System.Security.AccessControl (>= 4.5.0)
- System.Security.Cryptography.ProtectedData (>= 4.5.0)
- System.Security.Permissions (>= 4.5.0)
- System.Security.Principal.Windows (>= 4.5.0)
-
net9.0
- log4net (>= 3.1.0)
- Microsoft.Extensions.Logging.Abstractions (>= 2.1.1)
- Microsoft.NETCore.Platforms (>= 2.0.0)
- Newtonsoft.Json (>= 13.0.3)
- Quartz (>= 3.14.0)
- Quartz.Serialization.Json (>= 3.14.0)
- System.Buffers (>= 4.5.1)
- System.Configuration.ConfigurationManager (>= 4.5.0)
- System.Diagnostics.DiagnosticSource (>= 4.7.1)
- System.Memory (>= 4.5.4)
- System.Numerics.Vectors (>= 4.5.0)
- System.Runtime.CompilerServices.Unsafe (>= 4.5.3)
- System.Security.AccessControl (>= 4.5.0)
- System.Security.Cryptography.ProtectedData (>= 4.5.0)
- System.Security.Permissions (>= 4.5.0)
- System.Security.Principal.Windows (>= 4.5.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Wexflow:
Package | Downloads |
---|---|
OO.Workflow
Workflow types and implementations for EasyDataCore infrastructure |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
9.8.0 | 354 | 7/25/2025 |
9.7.0 | 447 | 7/23/2025 |
9.6.0 | 491 | 7/22/2025 |
9.5.2 | 375 | 7/21/2025 |
9.4.0 | 88 | 7/18/2025 |
9.3.0 | 120 | 7/16/2025 |
9.2.0 | 148 | 7/14/2025 |
9.1.0 | 89 | 7/11/2025 |
9.0.0 | 139 | 7/10/2025 |
8.9.0 | 184 | 6/19/2025 |
8.8.0 | 461 | 5/15/2025 |
8.7.0 | 160 | 5/3/2025 |
8.6.0 | 270 | 4/16/2025 |
8.5.0 | 410 | 2/19/2025 |
8.4.0 | 531 | 11/26/2024 |
8.3.0 | 444 | 9/19/2024 |
8.2.0 | 247 | 8/31/2024 |
8.1.0 | 146 | 8/30/2024 |
8.0.0 | 175 | 8/17/2024 |
7.9.0 | 174 | 7/23/2024 |
7.8.0 | 711 | 2/11/2024 |
7.7.0 | 464 | 12/9/2023 |
7.6.1 | 179 | 11/21/2023 |
7.5.0 | 220 | 10/16/2023 |
7.4.0 | 558 | 8/2/2023 |
7.3.0 | 415 | 7/22/2023 |
7.2.0 | 227 | 7/7/2023 |
7.1.0 | 235 | 7/1/2023 |
7.0.0 | 221 | 6/24/2023 |
6.9.4 | 211 | 6/21/2023 |
6.8.0 | 259 | 6/16/2023 |
6.7.0 | 330 | 6/10/2023 |
6.6.0 | 222 | 6/6/2023 |
6.5.0 | 210 | 5/27/2023 |
6.4.0 | 1,173 | 11/27/2022 |
6.3.0 | 363 | 11/20/2022 |
6.2.0 | 424 | 11/12/2022 |
6.1.0 | 410 | 11/5/2022 |
6.0.0 | 428 | 11/1/2022 |
5.8.0 | 6,802 | 6/25/2020 |
5.7.0 | 993 | 5/20/2020 |
5.6.0 | 906 | 5/11/2020 |
5.5.0 | 906 | 4/29/2020 |
5.4.2 | 903 | 4/16/2020 |
5.4.1 | 1,025 | 4/16/2020 |
5.4.0 | 948 | 4/15/2020 |
5.3.0 | 951 | 4/5/2020 |
5.2.0 | 1,094 | 12/5/2019 |
5.1.0 | 994 | 11/9/2019 |
5.0.0 | 979 | 10/22/2019 |
4.9.0 | 982 | 10/11/2019 |
4.8.0 | 969 | 9/25/2019 |
4.7.0 | 961 | 9/21/2019 |
4.6.0 | 979 | 9/16/2019 |
4.4.0 | 999 | 8/23/2019 |
4.3.0 | 972 | 8/13/2019 |
4.2.1 | 1,002 | 8/5/2019 |
4.2.0 | 974 | 8/2/2019 |
3.8.0 | 1,667 | 12/10/2018 |
3.7.0 | 1,139 | 12/3/2018 |
3.6.0 | 1,126 | 11/28/2018 |
3.5.0 | 1,136 | 11/23/2018 |
3.4.0 | 1,189 | 11/19/2018 |
3.3.0 | 1,126 | 11/16/2018 |
3.0.2 | 1,180 | 11/10/2018 |
3.0.1 | 1,177 | 11/7/2018 |
2.8.1 | 1,143 | 10/29/2018 |
2.7.2 | 1,181 | 10/23/2018 |
2.7.1 | 1,562 | 10/22/2018 |
2.3.3 | 1,566 | 11/22/2017 |
2.3.2 | 1,434 | 11/20/2017 |
2.3.1 | 1,419 | 11/14/2017 |
2.3.0 | 1,512 | 11/7/2017 |
2.2.0 | 1,474 | 11/3/2017 |
Bug fixes, performance enhancements, and under the hood updates.