feat(bpmn): scaffold Elsa.Bpmn and Elsa.Bpmn.Interchange modules (#7938)

Adds the valence-works/bpmn package feed and pins Bpmn.Model,
Bpmn.Semantics and Bpmn.Interchange at 0.1.1-preview.19, then wires
two new module projects consuming those libraries without
reimplementing anything they provide (D12): Elsa.Bpmn for BPMN
execution and Elsa.Bpmn.Interchange for XML import/export, kept as a
separate package so hosts that only execute BPMN don't take the XML
reader. Both are marked IsPackable=false until the Bpmn.* packages
are published to nuget.org. Test projects are added for both, unit
and integration, and all four are wired into Elsa.sln so PR CI
discovers and runs them. This unblocks #7925 and the rest of the
BPMN runtime work in #7909.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Sipke Schoorstra 2026-08-13 01:17:46 +02:00 committed by GitHub
parent 749b6491fc
commit 735e953dc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 448 additions and 0 deletions

View file

@ -98,6 +98,9 @@
<PackageVersion Include="Azure.ResourceManager.ServiceBus" Version="1.1.0"/>
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8"/>
<PackageVersion Include="Bogus" Version="35.6.5"/>
<PackageVersion Include="Bpmn.Interchange" Version="0.1.1-preview.19"/>
<PackageVersion Include="Bpmn.Model" Version="0.1.1-preview.19"/>
<PackageVersion Include="Bpmn.Semantics" Version="0.1.1-preview.19"/>
<PackageVersion Include="ConfigureAwait.Fody" Version="3.3.2" PrivateAssets="All"/>
<PackageVersion Include="ConsoleLogStreaming.Contracts" Version="1.0.0-preview.13"/>
<PackageVersion Include="ConsoleLogStreaming.Core" Version="1.0.0-preview.13"/>

View file

@ -225,6 +225,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scheduling", "scheduling",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scheduling", "src\modules\Elsa.Scheduling\Elsa.Scheduling.csproj", "{26849C37-2ACA-4DDE-83CD-B87939465791}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bpmn", "bpmn", "{F3F9E35C-1A59-423F-BA04-B4BD8366E6DF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Bpmn", "src\modules\Elsa.Bpmn\Elsa.Bpmn.csproj", "{6326EFE4-A6B1-4306-8551-41103EC38755}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Bpmn.Interchange", "src\modules\Elsa.Bpmn.Interchange\Elsa.Bpmn.Interchange.csproj", "{E2408639-12D3-4A17-AD40-F8A097E27009}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Workflows.Runtime.Distributed", "src\modules\Elsa.Workflows.Runtime.Distributed\Elsa.Workflows.Runtime.Distributed.csproj", "{42CE3E10-BC73-4D29-B099-88F0D5319E57}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "persistence", "persistence", "{3D0A6C71-4B96-411B-80DB-DDFAFF77C748}"
@ -263,8 +269,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Expressions.UnitTests"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scheduling.UnitTests", "test\unit\Elsa.Scheduling.UnitTests\Elsa.Scheduling.UnitTests.csproj", "{9AEE941A-3F23-4E4B-9B59-1A2F57FC762D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Bpmn.UnitTests", "test\unit\Elsa.Bpmn.UnitTests\Elsa.Bpmn.UnitTests.csproj", "{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Bpmn.Interchange.UnitTests", "test\unit\Elsa.Bpmn.Interchange.UnitTests\Elsa.Bpmn.Interchange.UnitTests.csproj", "{ECB546D5-8B38-47AF-87C1-70A0F03284D1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Common.IntegrationTests", "test\integration\Elsa.Common.IntegrationTests\Elsa.Common.IntegrationTests.csproj", "{6C451CC5-280E-475E-B95E-23ADCF0CCBFD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Bpmn.IntegrationTests", "test\integration\Elsa.Bpmn.IntegrationTests\Elsa.Bpmn.IntegrationTests.csproj", "{90D1A3F2-6A09-4E13-942C-6183D38C8E54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Bpmn.Interchange.IntegrationTests", "test\integration\Elsa.Bpmn.Interchange.IntegrationTests\Elsa.Bpmn.Interchange.IntegrationTests.csproj", "{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Dsl.ElsaScript", "src\modules\Elsa.Dsl.ElsaScript\Elsa.Dsl.ElsaScript.csproj", "{874F5A44-DB06-47AB-A18C-2D13942E0147}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Dsl.ElsaScript.IntegrationTests", "test\integration\Elsa.Dsl.ElsaScript.IntegrationTests\Elsa.Dsl.ElsaScript.IntegrationTests.csproj", "{4B5A9D32-58F2-47A9-8A1B-8A9E2D76C3F5}"
@ -1851,6 +1865,78 @@ Global
{C6EFA89A-923E-4F7A-A63B-BC8DDF44A208}.Release|x64.Build.0 = Release|Any CPU
{C6EFA89A-923E-4F7A-A63B-BC8DDF44A208}.Release|x86.ActiveCfg = Release|Any CPU
{C6EFA89A-923E-4F7A-A63B-BC8DDF44A208}.Release|x86.Build.0 = Release|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Debug|x64.ActiveCfg = Debug|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Debug|x64.Build.0 = Debug|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Debug|x86.ActiveCfg = Debug|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Debug|x86.Build.0 = Debug|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Release|Any CPU.Build.0 = Release|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Release|x64.ActiveCfg = Release|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Release|x64.Build.0 = Release|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Release|x86.ActiveCfg = Release|Any CPU
{6326EFE4-A6B1-4306-8551-41103EC38755}.Release|x86.Build.0 = Release|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Debug|x64.ActiveCfg = Debug|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Debug|x64.Build.0 = Debug|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Debug|x86.ActiveCfg = Debug|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Debug|x86.Build.0 = Debug|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Release|Any CPU.Build.0 = Release|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Release|x64.ActiveCfg = Release|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Release|x64.Build.0 = Release|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Release|x86.ActiveCfg = Release|Any CPU
{E2408639-12D3-4A17-AD40-F8A097E27009}.Release|x86.Build.0 = Release|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Debug|x64.ActiveCfg = Debug|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Debug|x64.Build.0 = Debug|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Debug|x86.ActiveCfg = Debug|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Debug|x86.Build.0 = Debug|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Release|Any CPU.Build.0 = Release|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Release|x64.ActiveCfg = Release|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Release|x64.Build.0 = Release|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Release|x86.ActiveCfg = Release|Any CPU
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE}.Release|x86.Build.0 = Release|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Debug|x64.ActiveCfg = Debug|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Debug|x64.Build.0 = Debug|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Debug|x86.ActiveCfg = Debug|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Debug|x86.Build.0 = Debug|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Release|Any CPU.Build.0 = Release|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Release|x64.ActiveCfg = Release|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Release|x64.Build.0 = Release|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Release|x86.ActiveCfg = Release|Any CPU
{ECB546D5-8B38-47AF-87C1-70A0F03284D1}.Release|x86.Build.0 = Release|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Debug|x64.ActiveCfg = Debug|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Debug|x64.Build.0 = Debug|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Debug|x86.ActiveCfg = Debug|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Debug|x86.Build.0 = Debug|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Release|Any CPU.Build.0 = Release|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Release|x64.ActiveCfg = Release|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Release|x64.Build.0 = Release|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Release|x86.ActiveCfg = Release|Any CPU
{90D1A3F2-6A09-4E13-942C-6183D38C8E54}.Release|x86.Build.0 = Release|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Debug|x64.ActiveCfg = Debug|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Debug|x64.Build.0 = Debug|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Debug|x86.ActiveCfg = Debug|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Debug|x86.Build.0 = Debug|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Release|Any CPU.Build.0 = Release|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Release|x64.ActiveCfg = Release|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Release|x64.Build.0 = Release|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Release|x86.ActiveCfg = Release|Any CPU
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1924,6 +2010,9 @@ Global
{0125BC8D-C837-414C-BB53-FCEA62E3060F} = {B08B4E00-C2AB-48F3-8389-449F42AEF179}
{7C038270-8BF7-4911-AC24-54D7BBE9BBF2} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79}
{26849C37-2ACA-4DDE-83CD-B87939465791} = {7C038270-8BF7-4911-AC24-54D7BBE9BBF2}
{F3F9E35C-1A59-423F-BA04-B4BD8366E6DF} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79}
{6326EFE4-A6B1-4306-8551-41103EC38755} = {F3F9E35C-1A59-423F-BA04-B4BD8366E6DF}
{E2408639-12D3-4A17-AD40-F8A097E27009} = {F3F9E35C-1A59-423F-BA04-B4BD8366E6DF}
{42CE3E10-BC73-4D29-B099-88F0D5319E57} = {B08B4E00-C2AB-48F3-8389-449F42AEF179}
{3D0A6C71-4B96-411B-80DB-DDFAFF77C748} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79}
{B0EC08F9-8FEB-43DB-A06F-57E3D35FE090} = {3D0A6C71-4B96-411B-80DB-DDFAFF77C748}
@ -1943,7 +2032,11 @@ Global
{20C75446-CAE0-48D1-85D9-459541C4D8B6} = {18453B51-25EB-4317-A4B3-B10518252E92}
{67E1F0CC-C436-4D71-AD2C-AE42E3AA8A0B} = {18453B51-25EB-4317-A4B3-B10518252E92}
{9AEE941A-3F23-4E4B-9B59-1A2F57FC762D} = {18453B51-25EB-4317-A4B3-B10518252E92}
{C8BDA5AA-14CE-41DF-85F7-49B752AECFDE} = {18453B51-25EB-4317-A4B3-B10518252E92}
{ECB546D5-8B38-47AF-87C1-70A0F03284D1} = {18453B51-25EB-4317-A4B3-B10518252E92}
{6C451CC5-280E-475E-B95E-23ADCF0CCBFD} = {1B8D5897-902E-4632-8698-E89CAF3DDF54}
{90D1A3F2-6A09-4E13-942C-6183D38C8E54} = {1B8D5897-902E-4632-8698-E89CAF3DDF54}
{EA2D95CD-62E7-4AA3-A27D-D1A467B7B0E7} = {1B8D5897-902E-4632-8698-E89CAF3DDF54}
{874F5A44-DB06-47AB-A18C-2D13942E0147} = {477C2416-312D-46AE-BCD6-8FA1FAB43624}
{4B5A9D32-58F2-47A9-8A1B-8A9E2D76C3F5} = {1B8D5897-902E-4632-8698-E89CAF3DDF54}
{2B7FB49D-E4B6-4AD5-981B-3D85B94F6F48} = {B08B4E00-C2AB-48F3-8389-449F42AEF179}

View file

@ -7,6 +7,7 @@
<add key="cshells-feedz" value="https://f.feedz.io/sfmskywalker/cshells/nuget/index.json" />
<add key="elsa-preview-feedz" value="https://f.feedz.io/elsa-workflows/elsa-3/nuget/index.json" />
<add key="valence-consolelogstream-feedz" value="https://f.feedz.io/valence-works/consolelogstream/nuget/index.json" />
<add key="bpmn-feedz" value="https://f.feedz.io/valence-works/bpmn/nuget/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="NuGet official package source">
@ -22,5 +23,8 @@
<package pattern="ConsoleLogStreaming" />
<package pattern="ConsoleLogStreaming.*" />
</packageSource>
<packageSource key="bpmn-feedz">
<package pattern="Bpmn.*" />
</packageSource>
</packageSourceMapping>
</configuration>

View file

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>
Provides BPMN XML interchange support by wiring the Bpmn.Interchange library into Elsa.
</Description>
<PackageTags>elsa extension module bpmn interchange</PackageTags>
<!-- Not packable until the Bpmn.* packages are published to nuget.org; they currently live only on the valence-works/bpmn feedz feed, so a published Elsa.Bpmn.Interchange would fail to restore for consumers. -->
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bpmn.Interchange" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Elsa.Bpmn\Elsa.Bpmn.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,23 @@
using Elsa.Bpmn.Interchange.Features;
using Elsa.Features.Services;
// ReSharper disable once CheckNamespace
namespace Elsa.Extensions;
/// <summary>
/// Provides extension methods for <see cref="IModule"/> instances.
/// </summary>
public static class ModuleExtensions
{
/// <summary>
/// Enables the BPMN interchange feature.
/// </summary>
/// <param name="module">The module.</param>
/// <param name="configure">A delegate to configure the feature.</param>
/// <returns>The module.</returns>
public static IModule UseBpmnInterchange(this IModule module, Action<BpmnInterchangeFeature>? configure = null)
{
module.Configure(configure);
return module;
}
}

View file

@ -0,0 +1,18 @@
using Elsa.Bpmn.Features;
using Elsa.Features.Abstractions;
using Elsa.Features.Attributes;
using Elsa.Features.Services;
namespace Elsa.Bpmn.Interchange.Features;
/// <summary>
/// Provides BPMN XML interchange support to the system.
/// </summary>
[DependsOn(typeof(BpmnFeature))]
public class BpmnInterchangeFeature : FeatureBase
{
/// <inheritdoc />
public BpmnInterchangeFeature(IModule module) : base(module)
{
}
}

View file

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
</Weavers>

View file

@ -0,0 +1,22 @@
using CShells.Features;
using Elsa.Bpmn.ShellFeatures;
using Elsa.Common.ShellFeatures;
using JetBrains.Annotations;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Bpmn.Interchange.ShellFeatures;
/// <summary>
/// Provides BPMN XML interchange support to the system.
/// </summary>
[ShellFeature(
DisplayName = "BPMN Interchange",
Description = "Provides BPMN XML interchange (import/export) capabilities for workflows.",
DependsOn = [typeof(BpmnFeature)])]
[UsedImplicitly]
public class BpmnInterchangeFeature : IShellFeature
{
public void ConfigureServices(IServiceCollection services)
{
}
}

View file

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>
Provides BPMN execution support by wiring the Bpmn.Model and Bpmn.Semantics libraries into Elsa.
</Description>
<PackageTags>elsa extension module bpmn</PackageTags>
<!-- Not packable until the Bpmn.* packages are published to nuget.org; they currently live only on the valence-works/bpmn feedz feed, so a published Elsa.Bpmn would fail to restore for consumers. -->
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bpmn.Model" />
<PackageReference Include="Bpmn.Semantics" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Elsa.Workflows.Runtime\Elsa.Workflows.Runtime.csproj" />
<ProjectReference Include="..\Elsa.Scheduling\Elsa.Scheduling.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,23 @@
using Elsa.Bpmn.Features;
using Elsa.Features.Services;
// ReSharper disable once CheckNamespace
namespace Elsa.Extensions;
/// <summary>
/// Provides extension methods for <see cref="IModule"/> instances.
/// </summary>
public static class ModuleExtensions
{
/// <summary>
/// Enables the BPMN feature.
/// </summary>
/// <param name="module">The module.</param>
/// <param name="configure">A delegate to configure the feature.</param>
/// <returns>The module.</returns>
public static IModule UseBpmn(this IModule module, Action<BpmnFeature>? configure = null)
{
module.Configure(configure);
return module;
}
}

View file

@ -0,0 +1,15 @@
using Elsa.Features.Abstractions;
using Elsa.Features.Services;
namespace Elsa.Bpmn.Features;
/// <summary>
/// Provides BPMN execution support to the system.
/// </summary>
public class BpmnFeature : FeatureBase
{
/// <inheritdoc />
public BpmnFeature(IModule module) : base(module)
{
}
}

View file

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
</Weavers>

View file

@ -0,0 +1,20 @@
using CShells.Features;
using Elsa.Common.ShellFeatures;
using JetBrains.Annotations;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Bpmn.ShellFeatures;
/// <summary>
/// Provides BPMN execution support to the system.
/// </summary>
[ShellFeature(
DisplayName = "BPMN",
Description = "Provides BPMN execution capabilities for workflows.")]
[UsedImplicitly]
public class BpmnFeature : IShellFeature
{
public void ConfigureServices(IServiceCollection services)
{
}
}

View file

@ -0,0 +1,29 @@
using Elsa.Extensions;
using Elsa.Features.Contracts;
using Elsa.Testing.Shared;
using Microsoft.Extensions.DependencyInjection;
using Xunit.Abstractions;
namespace Elsa.Bpmn.IntegrationTests;
public class BpmnFeatureTests
{
private readonly ITestOutputHelper _testOutputHelper;
public BpmnFeatureTests(ITestOutputHelper testOutputHelper)
{
_testOutputHelper = testOutputHelper;
}
[Fact]
public void Build_WithUseBpmn_RegistersBpmnFeature()
{
var services = new TestApplicationBuilder(_testOutputHelper)
.ConfigureElsa(elsa => elsa.UseBpmn())
.Build();
var registry = services.GetRequiredService<IInstalledFeatureRegistry>();
Assert.NotNull(registry.Find("Elsa.Bpmn"));
}
}

View file

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Include>[Elsa.Bpmn]*</Include>
<Threshold>1</Threshold>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\common\Elsa.Testing.Shared.Integration\Elsa.Testing.Shared.Integration.csproj"/>
<ProjectReference Include="..\..\..\src\modules\Elsa.Bpmn\Elsa.Bpmn.csproj"/>
</ItemGroup>
</Project>

View file

@ -0,0 +1,30 @@
using Elsa.Extensions;
using Elsa.Features.Contracts;
using Elsa.Testing.Shared;
using Microsoft.Extensions.DependencyInjection;
using Xunit.Abstractions;
namespace Elsa.Bpmn.Interchange.IntegrationTests;
public class BpmnInterchangeFeatureTests
{
private readonly ITestOutputHelper _testOutputHelper;
public BpmnInterchangeFeatureTests(ITestOutputHelper testOutputHelper)
{
_testOutputHelper = testOutputHelper;
}
[Fact]
public void Build_WithUseBpmnInterchange_RegistersBpmnInterchangeFeature()
{
var services = new TestApplicationBuilder(_testOutputHelper)
.ConfigureElsa(elsa => elsa.UseBpmnInterchange())
.Build();
var registry = services.GetRequiredService<IInstalledFeatureRegistry>();
Assert.NotNull(registry.Find("Elsa.Bpmn"));
Assert.NotNull(registry.Find("Elsa.BpmnInterchange"));
}
}

View file

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Include>[Elsa.Bpmn.Interchange]*</Include>
<Threshold>1</Threshold>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\common\Elsa.Testing.Shared.Integration\Elsa.Testing.Shared.Integration.csproj"/>
<ProjectReference Include="..\..\..\src\modules\Elsa.Bpmn.Interchange\Elsa.Bpmn.Interchange.csproj"/>
</ItemGroup>
</Project>

View file

@ -0,0 +1,20 @@
using Elsa.Bpmn.Interchange.Features;
using Elsa.Extensions;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Bpmn.Interchange.UnitTests;
public class BpmnInterchangeFeatureTests
{
[Fact]
public void UseBpmnInterchange_ConfiguresBpmnInterchangeFeature()
{
var services = new ServiceCollection();
var module = services.CreateModule();
module.UseBpmnInterchange();
module.Apply();
Assert.True(module.HasFeature<BpmnInterchangeFeature>());
}
}

View file

@ -0,0 +1,14 @@
using Bpmn.Interchange;
namespace Elsa.Bpmn.Interchange.UnitTests;
public class BpmnInterchangeWiringTests
{
[Fact]
public void BpmnXmlReader_IsReachable()
{
var reader = new BpmnXmlReader();
Assert.NotNull(reader);
}
}

View file

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Include>[Elsa.Bpmn.Interchange]*</Include>
<Threshold>1</Threshold>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\common\Elsa.Testing.Shared\Elsa.Testing.Shared.csproj"/>
<ProjectReference Include="..\..\..\src\modules\Elsa.Bpmn.Interchange\Elsa.Bpmn.Interchange.csproj"/>
</ItemGroup>
</Project>

View file

@ -0,0 +1,20 @@
using Elsa.Bpmn.Features;
using Elsa.Extensions;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Bpmn.UnitTests;
public class BpmnFeatureTests
{
[Fact]
public void UseBpmn_ConfiguresBpmnFeature()
{
var services = new ServiceCollection();
var module = services.CreateModule();
module.UseBpmn();
module.Apply();
Assert.True(module.HasFeature<BpmnFeature>());
}
}

View file

@ -0,0 +1,14 @@
using Bpmn.Semantics;
namespace Elsa.Bpmn.UnitTests;
public class BpmnSemanticsWiringTests
{
[Fact]
public void CreateDefault_ReturnsInterpreter()
{
var interpreter = BpmnInterpreter.CreateDefault();
Assert.NotNull(interpreter);
}
}

View file

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Include>[Elsa.Bpmn]*</Include>
<Threshold>1</Threshold>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\common\Elsa.Testing.Shared\Elsa.Testing.Shared.csproj"/>
<ProjectReference Include="..\..\..\src\modules\Elsa.Bpmn\Elsa.Bpmn.csproj"/>
</ItemGroup>
</Project>