Add sources from experimental repo

This commit is contained in:
Sipke Schoorstra 2022-01-04 09:42:12 +01:00
parent 42ce946d64
commit 689147b9ca
647 changed files with 29101 additions and 0 deletions

72
.gitignore vendored Normal file
View file

@ -0,0 +1,72 @@
#Ignore thumbnails created by Windows
Thumbs.db
#Ignore files built by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
.vs/
# VS Code/Omnisharp crash dumps
mono_crash.mem*.blob
#Nuget packages folder
packages/
#Ignore git-related files
*.orig
#Rider
.idea
#wwwroot
wwwroot/
#npm
node_modules/
.babelrc
.stylelintrc.yml
.eslintrc.yml
#github
.github/
#volatile
App_Data/
*.db
*.db-shm
*.db-wal
# Fody - auto-generated XML schema
FodyWeavers.xsd
# Elsa Stencil Components
src/designer/elsa-workflows-designer/dist
src/designer/elsa-workflows-designer/www
src/designer/elsa-workflows-designer/loader
# Created by developers using GNU/Linux
.directory

222
Elsa.ProtoActor.sln Normal file
View file

@ -0,0 +1,222 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{61017E64-6D00-49CB-9E81-5002DC8F7D5F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{155227F0-A33B-40AA-A4B4-06F813EB921B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{C6658DE0-2B2F-47F0-BB61-2CA66D435C09}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "activities", "activities", "{F8604289-6D28-428E-9FA8-1480464964F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.Console1", "src\samples\console\Elsa.Samples.Console1\Elsa.Samples.Console1.csproj", "{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Core", "src\core\Elsa.Core\Elsa.Core.csproj", "{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Extensions.DependencyInjection", "src\core\Elsa.Extensions.DependencyInjection\Elsa.Extensions.DependencyInjection.csproj", "{042022EA-62BC-44BD-A93F-11ABDB39C791}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution", "solution", "{7D21EB5E-D6B4-48A5-A9BC-A26387A65F0B}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
docker-compose.yml = docker-compose.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{0354F050-3992-4DD4-B0EE-5FBA04AC72B6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "architecture", "architecture", "{A34FD350-79C5-492A-8811-6DBD80830F8B}"
ProjectSection(SolutionItems) = preProject
docs\architecture\Layer1.md = docs\architecture\Layer1.md
docs\architecture\Layer2.md = docs\architecture\Layer2.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "console", "console", "{873BFC3E-63C2-4495-A503-5EC05DCD84E4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "aspnet", "aspnet", "{56C2FFB8-EA54-45B5-A095-4A78142EB4B5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.Web1", "src\samples\aspnet\Elsa.Samples.Web1\Elsa.Samples.Web1.csproj", "{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Http", "src\activities\Elsa.Activities.Http\Elsa.Activities.Http.csproj", "{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{298BA226-B766-40AE-933F-EB9AFCDE051C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Api", "src\api\Elsa.Api\Elsa.Api.csproj", "{39C6C4A2-077E-48C2-B295-DFE357EC38B2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "persistence", "persistence", "{9B7776E2-0014-4C87-B1F4-22FB0BC076F1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Persistence.InMemory", "src\persistence\Elsa.Persistence.InMemory\Elsa.Persistence.InMemory.csproj", "{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "runtime", "runtime", "{04584653-8E42-47DB-850B-7C6C37B307B7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Runtime", "src\runtime\Elsa.Runtime\Elsa.Runtime.csproj", "{8C5894A4-F358-45CF-B198-BFBCA30B77F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Persistence.Abstractions", "src\persistence\Elsa.Persistence.Abstractions\Elsa.Persistence.Abstractions.csproj", "{C0226CDD-DF79-4767-A4A5-3D9037535929}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Runtime.HostedServices", "src\runtime\Elsa.Runtime.HostedServices\Elsa.Runtime.HostedServices.csproj", "{4A874C29-2915-4F5C-A01A-80F56B929541}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dsl", "dsl", "{CE121DFD-72D4-4DB7-968F-C0DB320D08FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Dsl", "src\dsl\Elsa.Dsl\Elsa.Dsl.csproj", "{61F5C50C-C572-46AB-8F37-54D1F84CC31D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.Console2", "src\samples\console\Elsa.Samples.Console2\Elsa.Samples.Console2.csproj", "{48960E35-903C-4EF0-A8F4-3871B000B12D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Timers", "src\activities\Elsa.Activities.Timers\Elsa.Activities.Timers.csproj", "{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripting", "scripting", "{2633B8B9-4AEC-4A54-8832-1C940B54E041}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scripting.JavaScript", "src\scripting\Elsa.Scripting.JavaScript\Elsa.Scripting.JavaScript.csproj", "{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Runtime.ProtoActor", "src\runtime\Elsa.Runtime.ProtoActor\Elsa.Runtime.ProtoActor.csproj", "{E5A05E1D-0F7F-4030-B434-596C76486CDB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.Web2", "src\samples\aspnet\Elsa.Samples.Web2\Elsa.Samples.Web2.csproj", "{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protoactor", "protoactor", "{03A5D774-A546-4D4B-8687-C6F96A886C72}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proto.Actor", "..\..\ProtoActor\protoactor-dotnet\src\Proto.Actor\Proto.Actor.csproj", "{B8F68D35-C561-4C45-881D-84142B557A54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proto.Cluster", "..\..\ProtoActor\protoactor-dotnet\src\Proto.Cluster\Proto.Cluster.csproj", "{E27E725F-C4B0-4D6E-ADA0-DD7D014F4C6C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proto.Cluster.TestProvider", "..\..\ProtoActor\protoactor-dotnet\src\Proto.Cluster.TestProvider\Proto.Cluster.TestProvider.csproj", "{EB1BACFB-3DF0-45D0-89AF-4571023DDE50}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proto.Remote", "..\..\ProtoActor\protoactor-dotnet\src\Proto.Remote\Proto.Remote.csproj", "{0BD81F36-D6B4-4DF1-8BAA-5F25B6779FC5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Proto.Remote.GrpcCore", "..\..\ProtoActor\protoactor-dotnet\src\Proto.Remote.GrpcCore\Proto.Remote.GrpcCore.csproj", "{466E5047-4184-42C6-9C4D-14A5707E2F49}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Api.Core", "src\api\Elsa.Api.Core\Elsa.Api.Core.csproj", "{A335B51D-8219-4361-BAAF-5F5D1B74EF89}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa", "src\core\Elsa\Elsa.csproj", "{521365AE-A681-4E4B-87E6-B4D982CDD520}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}.Release|Any CPU.Build.0 = Release|Any CPU
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}.Release|Any CPU.Build.0 = Release|Any CPU
{042022EA-62BC-44BD-A93F-11ABDB39C791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{042022EA-62BC-44BD-A93F-11ABDB39C791}.Debug|Any CPU.Build.0 = Debug|Any CPU
{042022EA-62BC-44BD-A93F-11ABDB39C791}.Release|Any CPU.ActiveCfg = Release|Any CPU
{042022EA-62BC-44BD-A93F-11ABDB39C791}.Release|Any CPU.Build.0 = Release|Any CPU
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}.Release|Any CPU.Build.0 = Release|Any CPU
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}.Release|Any CPU.Build.0 = Release|Any CPU
{39C6C4A2-077E-48C2-B295-DFE357EC38B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39C6C4A2-077E-48C2-B295-DFE357EC38B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39C6C4A2-077E-48C2-B295-DFE357EC38B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39C6C4A2-077E-48C2-B295-DFE357EC38B2}.Release|Any CPU.Build.0 = Release|Any CPU
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}.Release|Any CPU.Build.0 = Release|Any CPU
{8C5894A4-F358-45CF-B198-BFBCA30B77F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C5894A4-F358-45CF-B198-BFBCA30B77F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C5894A4-F358-45CF-B198-BFBCA30B77F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C5894A4-F358-45CF-B198-BFBCA30B77F6}.Release|Any CPU.Build.0 = Release|Any CPU
{C0226CDD-DF79-4767-A4A5-3D9037535929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0226CDD-DF79-4767-A4A5-3D9037535929}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0226CDD-DF79-4767-A4A5-3D9037535929}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0226CDD-DF79-4767-A4A5-3D9037535929}.Release|Any CPU.Build.0 = Release|Any CPU
{4A874C29-2915-4F5C-A01A-80F56B929541}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A874C29-2915-4F5C-A01A-80F56B929541}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A874C29-2915-4F5C-A01A-80F56B929541}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A874C29-2915-4F5C-A01A-80F56B929541}.Release|Any CPU.Build.0 = Release|Any CPU
{61F5C50C-C572-46AB-8F37-54D1F84CC31D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61F5C50C-C572-46AB-8F37-54D1F84CC31D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61F5C50C-C572-46AB-8F37-54D1F84CC31D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61F5C50C-C572-46AB-8F37-54D1F84CC31D}.Release|Any CPU.Build.0 = Release|Any CPU
{48960E35-903C-4EF0-A8F4-3871B000B12D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48960E35-903C-4EF0-A8F4-3871B000B12D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48960E35-903C-4EF0-A8F4-3871B000B12D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48960E35-903C-4EF0-A8F4-3871B000B12D}.Release|Any CPU.Build.0 = Release|Any CPU
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}.Release|Any CPU.Build.0 = Release|Any CPU
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}.Release|Any CPU.Build.0 = Release|Any CPU
{E5A05E1D-0F7F-4030-B434-596C76486CDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5A05E1D-0F7F-4030-B434-596C76486CDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5A05E1D-0F7F-4030-B434-596C76486CDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5A05E1D-0F7F-4030-B434-596C76486CDB}.Release|Any CPU.Build.0 = Release|Any CPU
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}.Release|Any CPU.Build.0 = Release|Any CPU
{B8F68D35-C561-4C45-881D-84142B557A54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B8F68D35-C561-4C45-881D-84142B557A54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B8F68D35-C561-4C45-881D-84142B557A54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B8F68D35-C561-4C45-881D-84142B557A54}.Release|Any CPU.Build.0 = Release|Any CPU
{E27E725F-C4B0-4D6E-ADA0-DD7D014F4C6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E27E725F-C4B0-4D6E-ADA0-DD7D014F4C6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E27E725F-C4B0-4D6E-ADA0-DD7D014F4C6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E27E725F-C4B0-4D6E-ADA0-DD7D014F4C6C}.Release|Any CPU.Build.0 = Release|Any CPU
{EB1BACFB-3DF0-45D0-89AF-4571023DDE50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB1BACFB-3DF0-45D0-89AF-4571023DDE50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB1BACFB-3DF0-45D0-89AF-4571023DDE50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB1BACFB-3DF0-45D0-89AF-4571023DDE50}.Release|Any CPU.Build.0 = Release|Any CPU
{0BD81F36-D6B4-4DF1-8BAA-5F25B6779FC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BD81F36-D6B4-4DF1-8BAA-5F25B6779FC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BD81F36-D6B4-4DF1-8BAA-5F25B6779FC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BD81F36-D6B4-4DF1-8BAA-5F25B6779FC5}.Release|Any CPU.Build.0 = Release|Any CPU
{466E5047-4184-42C6-9C4D-14A5707E2F49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{466E5047-4184-42C6-9C4D-14A5707E2F49}.Debug|Any CPU.Build.0 = Debug|Any CPU
{466E5047-4184-42C6-9C4D-14A5707E2F49}.Release|Any CPU.ActiveCfg = Release|Any CPU
{466E5047-4184-42C6-9C4D-14A5707E2F49}.Release|Any CPU.Build.0 = Release|Any CPU
{A335B51D-8219-4361-BAAF-5F5D1B74EF89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A335B51D-8219-4361-BAAF-5F5D1B74EF89}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A335B51D-8219-4361-BAAF-5F5D1B74EF89}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A335B51D-8219-4361-BAAF-5F5D1B74EF89}.Release|Any CPU.Build.0 = Release|Any CPU
{521365AE-A681-4E4B-87E6-B4D982CDD520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{521365AE-A681-4E4B-87E6-B4D982CDD520}.Debug|Any CPU.Build.0 = Debug|Any CPU
{521365AE-A681-4E4B-87E6-B4D982CDD520}.Release|Any CPU.ActiveCfg = Release|Any CPU
{521365AE-A681-4E4B-87E6-B4D982CDD520}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{155227F0-A33B-40AA-A4B4-06F813EB921B} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{C6658DE0-2B2F-47F0-BB61-2CA66D435C09} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{F8604289-6D28-428E-9FA8-1480464964F0} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9} = {C6658DE0-2B2F-47F0-BB61-2CA66D435C09}
{042022EA-62BC-44BD-A93F-11ABDB39C791} = {C6658DE0-2B2F-47F0-BB61-2CA66D435C09}
{A34FD350-79C5-492A-8811-6DBD80830F8B} = {0354F050-3992-4DD4-B0EE-5FBA04AC72B6}
{873BFC3E-63C2-4495-A503-5EC05DCD84E4} = {155227F0-A33B-40AA-A4B4-06F813EB921B}
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09} = {873BFC3E-63C2-4495-A503-5EC05DCD84E4}
{56C2FFB8-EA54-45B5-A095-4A78142EB4B5} = {155227F0-A33B-40AA-A4B4-06F813EB921B}
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678} = {56C2FFB8-EA54-45B5-A095-4A78142EB4B5}
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E} = {F8604289-6D28-428E-9FA8-1480464964F0}
{298BA226-B766-40AE-933F-EB9AFCDE051C} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{39C6C4A2-077E-48C2-B295-DFE357EC38B2} = {298BA226-B766-40AE-933F-EB9AFCDE051C}
{9B7776E2-0014-4C87-B1F4-22FB0BC076F1} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C} = {9B7776E2-0014-4C87-B1F4-22FB0BC076F1}
{04584653-8E42-47DB-850B-7C6C37B307B7} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{8C5894A4-F358-45CF-B198-BFBCA30B77F6} = {04584653-8E42-47DB-850B-7C6C37B307B7}
{C0226CDD-DF79-4767-A4A5-3D9037535929} = {9B7776E2-0014-4C87-B1F4-22FB0BC076F1}
{4A874C29-2915-4F5C-A01A-80F56B929541} = {04584653-8E42-47DB-850B-7C6C37B307B7}
{CE121DFD-72D4-4DB7-968F-C0DB320D08FB} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{61F5C50C-C572-46AB-8F37-54D1F84CC31D} = {CE121DFD-72D4-4DB7-968F-C0DB320D08FB}
{48960E35-903C-4EF0-A8F4-3871B000B12D} = {873BFC3E-63C2-4495-A503-5EC05DCD84E4}
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206} = {F8604289-6D28-428E-9FA8-1480464964F0}
{2633B8B9-4AEC-4A54-8832-1C940B54E041} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9} = {2633B8B9-4AEC-4A54-8832-1C940B54E041}
{E5A05E1D-0F7F-4030-B434-596C76486CDB} = {04584653-8E42-47DB-850B-7C6C37B307B7}
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF} = {56C2FFB8-EA54-45B5-A095-4A78142EB4B5}
{B8F68D35-C561-4C45-881D-84142B557A54} = {03A5D774-A546-4D4B-8687-C6F96A886C72}
{E27E725F-C4B0-4D6E-ADA0-DD7D014F4C6C} = {03A5D774-A546-4D4B-8687-C6F96A886C72}
{EB1BACFB-3DF0-45D0-89AF-4571023DDE50} = {03A5D774-A546-4D4B-8687-C6F96A886C72}
{0BD81F36-D6B4-4DF1-8BAA-5F25B6779FC5} = {03A5D774-A546-4D4B-8687-C6F96A886C72}
{466E5047-4184-42C6-9C4D-14A5707E2F49} = {03A5D774-A546-4D4B-8687-C6F96A886C72}
{A335B51D-8219-4361-BAAF-5F5D1B74EF89} = {298BA226-B766-40AE-933F-EB9AFCDE051C}
{521365AE-A681-4E4B-87E6-B4D982CDD520} = {C6658DE0-2B2F-47F0-BB61-2CA66D435C09}
EndGlobalSection
EndGlobal

202
Elsa.sln Normal file
View file

@ -0,0 +1,202 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{61017E64-6D00-49CB-9E81-5002DC8F7D5F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{155227F0-A33B-40AA-A4B4-06F813EB921B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{C6658DE0-2B2F-47F0-BB61-2CA66D435C09}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "activities", "activities", "{F8604289-6D28-428E-9FA8-1480464964F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.Console1", "src\samples\console\Elsa.Samples.Console1\Elsa.Samples.Console1.csproj", "{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Core", "src\core\Elsa.Core\Elsa.Core.csproj", "{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution", "solution", "{7D21EB5E-D6B4-48A5-A9BC-A26387A65F0B}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
docker-compose.yml = docker-compose.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{0354F050-3992-4DD4-B0EE-5FBA04AC72B6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "architecture", "architecture", "{A34FD350-79C5-492A-8811-6DBD80830F8B}"
ProjectSection(SolutionItems) = preProject
docs\architecture\Layer1.md = docs\architecture\Layer1.md
docs\architecture\Layer2.md = docs\architecture\Layer2.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "console", "console", "{873BFC3E-63C2-4495-A503-5EC05DCD84E4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "aspnet", "aspnet", "{56C2FFB8-EA54-45B5-A095-4A78142EB4B5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.Web1", "src\samples\aspnet\Elsa.Samples.Web1\Elsa.Samples.Web1.csproj", "{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Http", "src\activities\Elsa.Activities.Http\Elsa.Activities.Http.csproj", "{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{298BA226-B766-40AE-933F-EB9AFCDE051C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Api", "src\api\Elsa.Api\Elsa.Api.csproj", "{39C6C4A2-077E-48C2-B295-DFE357EC38B2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "persistence", "persistence", "{9B7776E2-0014-4C87-B1F4-22FB0BC076F1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Persistence.InMemory", "src\persistence\Elsa.Persistence.InMemory\Elsa.Persistence.InMemory.csproj", "{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "runtime", "runtime", "{04584653-8E42-47DB-850B-7C6C37B307B7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Runtime", "src\runtime\Elsa.Runtime\Elsa.Runtime.csproj", "{8C5894A4-F358-45CF-B198-BFBCA30B77F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Persistence.Abstractions", "src\persistence\Elsa.Persistence.Abstractions\Elsa.Persistence.Abstractions.csproj", "{C0226CDD-DF79-4767-A4A5-3D9037535929}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dsl", "dsl", "{CE121DFD-72D4-4DB7-968F-C0DB320D08FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Dsl", "src\dsl\Elsa.Dsl\Elsa.Dsl.csproj", "{61F5C50C-C572-46AB-8F37-54D1F84CC31D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.Console2", "src\samples\console\Elsa.Samples.Console2\Elsa.Samples.Console2.csproj", "{48960E35-903C-4EF0-A8F4-3871B000B12D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Activities.Timers", "src\activities\Elsa.Activities.Timers\Elsa.Activities.Timers.csproj", "{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripting", "scripting", "{2633B8B9-4AEC-4A54-8832-1C940B54E041}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Scripting.JavaScript", "src\scripting\Elsa.Scripting.JavaScript\Elsa.Scripting.JavaScript.csproj", "{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Runtime.ProtoActor", "src\runtime\Elsa.Runtime.ProtoActor\Elsa.Runtime.ProtoActor.csproj", "{E5A05E1D-0F7F-4030-B434-596C76486CDB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Samples.Web2", "src\samples\aspnet\Elsa.Samples.Web2\Elsa.Samples.Web2.csproj", "{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa", "src\core\Elsa\Elsa.csproj", "{521365AE-A681-4E4B-87E6-B4D982CDD520}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Mediator", "src\core\Elsa.Mediator\Elsa.Mediator.csproj", "{5CC45C6C-0751-4A33-8306-758BB17417F7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Management", "src\core\Elsa.Management\Elsa.Management.csproj", "{03C2D8B9-C61F-4750-8107-765E3FE02ADA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "efcore", "efcore", "{9F8AE7FB-E5F9-4DCB-9CF8-0362B3D18DAA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Persistence.EntityFrameworkCore", "src\persistence\Elsa.Persistence.EntityFrameworkCore\Elsa.Persistence.EntityFrameworkCore.csproj", "{D8130816-C1D9-40A3-9079-F2887FE35EA9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Persistence.EntityFrameworkCore.Sqlite", "src\persistence\Elsa.Persistence.EntityFrameworkCore.Sqlite\Elsa.Persistence.EntityFrameworkCore.Sqlite.csproj", "{820016B7-01CD-4032-8239-6A4E53F1A352}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Serialization", "src\core\Elsa.Serialization\Elsa.Serialization.csproj", "{55F9B33D-5FAF-4355-97EF-445C93208E85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09}.Release|Any CPU.Build.0 = Release|Any CPU
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9}.Release|Any CPU.Build.0 = Release|Any CPU
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678}.Release|Any CPU.Build.0 = Release|Any CPU
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E}.Release|Any CPU.Build.0 = Release|Any CPU
{39C6C4A2-077E-48C2-B295-DFE357EC38B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39C6C4A2-077E-48C2-B295-DFE357EC38B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39C6C4A2-077E-48C2-B295-DFE357EC38B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39C6C4A2-077E-48C2-B295-DFE357EC38B2}.Release|Any CPU.Build.0 = Release|Any CPU
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C}.Release|Any CPU.Build.0 = Release|Any CPU
{8C5894A4-F358-45CF-B198-BFBCA30B77F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C5894A4-F358-45CF-B198-BFBCA30B77F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C5894A4-F358-45CF-B198-BFBCA30B77F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C5894A4-F358-45CF-B198-BFBCA30B77F6}.Release|Any CPU.Build.0 = Release|Any CPU
{C0226CDD-DF79-4767-A4A5-3D9037535929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C0226CDD-DF79-4767-A4A5-3D9037535929}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C0226CDD-DF79-4767-A4A5-3D9037535929}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C0226CDD-DF79-4767-A4A5-3D9037535929}.Release|Any CPU.Build.0 = Release|Any CPU
{61F5C50C-C572-46AB-8F37-54D1F84CC31D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{61F5C50C-C572-46AB-8F37-54D1F84CC31D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{61F5C50C-C572-46AB-8F37-54D1F84CC31D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{61F5C50C-C572-46AB-8F37-54D1F84CC31D}.Release|Any CPU.Build.0 = Release|Any CPU
{48960E35-903C-4EF0-A8F4-3871B000B12D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48960E35-903C-4EF0-A8F4-3871B000B12D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48960E35-903C-4EF0-A8F4-3871B000B12D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48960E35-903C-4EF0-A8F4-3871B000B12D}.Release|Any CPU.Build.0 = Release|Any CPU
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206}.Release|Any CPU.Build.0 = Release|Any CPU
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9}.Release|Any CPU.Build.0 = Release|Any CPU
{E5A05E1D-0F7F-4030-B434-596C76486CDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5A05E1D-0F7F-4030-B434-596C76486CDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5A05E1D-0F7F-4030-B434-596C76486CDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5A05E1D-0F7F-4030-B434-596C76486CDB}.Release|Any CPU.Build.0 = Release|Any CPU
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF}.Release|Any CPU.Build.0 = Release|Any CPU
{521365AE-A681-4E4B-87E6-B4D982CDD520}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{521365AE-A681-4E4B-87E6-B4D982CDD520}.Debug|Any CPU.Build.0 = Debug|Any CPU
{521365AE-A681-4E4B-87E6-B4D982CDD520}.Release|Any CPU.ActiveCfg = Release|Any CPU
{521365AE-A681-4E4B-87E6-B4D982CDD520}.Release|Any CPU.Build.0 = Release|Any CPU
{5CC45C6C-0751-4A33-8306-758BB17417F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5CC45C6C-0751-4A33-8306-758BB17417F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CC45C6C-0751-4A33-8306-758BB17417F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CC45C6C-0751-4A33-8306-758BB17417F7}.Release|Any CPU.Build.0 = Release|Any CPU
{03C2D8B9-C61F-4750-8107-765E3FE02ADA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03C2D8B9-C61F-4750-8107-765E3FE02ADA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03C2D8B9-C61F-4750-8107-765E3FE02ADA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03C2D8B9-C61F-4750-8107-765E3FE02ADA}.Release|Any CPU.Build.0 = Release|Any CPU
{D8130816-C1D9-40A3-9079-F2887FE35EA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8130816-C1D9-40A3-9079-F2887FE35EA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8130816-C1D9-40A3-9079-F2887FE35EA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8130816-C1D9-40A3-9079-F2887FE35EA9}.Release|Any CPU.Build.0 = Release|Any CPU
{820016B7-01CD-4032-8239-6A4E53F1A352}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{820016B7-01CD-4032-8239-6A4E53F1A352}.Debug|Any CPU.Build.0 = Debug|Any CPU
{820016B7-01CD-4032-8239-6A4E53F1A352}.Release|Any CPU.ActiveCfg = Release|Any CPU
{820016B7-01CD-4032-8239-6A4E53F1A352}.Release|Any CPU.Build.0 = Release|Any CPU
{55F9B33D-5FAF-4355-97EF-445C93208E85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55F9B33D-5FAF-4355-97EF-445C93208E85}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55F9B33D-5FAF-4355-97EF-445C93208E85}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55F9B33D-5FAF-4355-97EF-445C93208E85}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{155227F0-A33B-40AA-A4B4-06F813EB921B} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{C6658DE0-2B2F-47F0-BB61-2CA66D435C09} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{F8604289-6D28-428E-9FA8-1480464964F0} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{6FA9ED7D-2D32-46BC-B47F-E503B2A4C0A9} = {C6658DE0-2B2F-47F0-BB61-2CA66D435C09}
{A34FD350-79C5-492A-8811-6DBD80830F8B} = {0354F050-3992-4DD4-B0EE-5FBA04AC72B6}
{873BFC3E-63C2-4495-A503-5EC05DCD84E4} = {155227F0-A33B-40AA-A4B4-06F813EB921B}
{B44A9DDA-8091-490A-BC0B-2EAE4A601B09} = {873BFC3E-63C2-4495-A503-5EC05DCD84E4}
{56C2FFB8-EA54-45B5-A095-4A78142EB4B5} = {155227F0-A33B-40AA-A4B4-06F813EB921B}
{A2E6E9A4-4C21-4022-A53E-BDF5ED0D0678} = {56C2FFB8-EA54-45B5-A095-4A78142EB4B5}
{CF88276B-D1C8-4E0D-8043-0BFA54DA693E} = {F8604289-6D28-428E-9FA8-1480464964F0}
{298BA226-B766-40AE-933F-EB9AFCDE051C} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{39C6C4A2-077E-48C2-B295-DFE357EC38B2} = {298BA226-B766-40AE-933F-EB9AFCDE051C}
{9B7776E2-0014-4C87-B1F4-22FB0BC076F1} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{BC97FD3A-1351-443C-9EAE-0F28F8204A6C} = {9B7776E2-0014-4C87-B1F4-22FB0BC076F1}
{04584653-8E42-47DB-850B-7C6C37B307B7} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{8C5894A4-F358-45CF-B198-BFBCA30B77F6} = {04584653-8E42-47DB-850B-7C6C37B307B7}
{C0226CDD-DF79-4767-A4A5-3D9037535929} = {9B7776E2-0014-4C87-B1F4-22FB0BC076F1}
{CE121DFD-72D4-4DB7-968F-C0DB320D08FB} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{61F5C50C-C572-46AB-8F37-54D1F84CC31D} = {CE121DFD-72D4-4DB7-968F-C0DB320D08FB}
{48960E35-903C-4EF0-A8F4-3871B000B12D} = {873BFC3E-63C2-4495-A503-5EC05DCD84E4}
{9FE7C169-F639-4F6D-86EB-D97FE3E9D206} = {F8604289-6D28-428E-9FA8-1480464964F0}
{2633B8B9-4AEC-4A54-8832-1C940B54E041} = {61017E64-6D00-49CB-9E81-5002DC8F7D5F}
{5D349665-3B5D-4DA4-A7B0-C6F11611B0C9} = {2633B8B9-4AEC-4A54-8832-1C940B54E041}
{E5A05E1D-0F7F-4030-B434-596C76486CDB} = {04584653-8E42-47DB-850B-7C6C37B307B7}
{13A6BAF1-9BAD-4A3A-A61F-5E4F01CDF0BF} = {56C2FFB8-EA54-45B5-A095-4A78142EB4B5}
{521365AE-A681-4E4B-87E6-B4D982CDD520} = {C6658DE0-2B2F-47F0-BB61-2CA66D435C09}
{5CC45C6C-0751-4A33-8306-758BB17417F7} = {C6658DE0-2B2F-47F0-BB61-2CA66D435C09}
{03C2D8B9-C61F-4750-8107-765E3FE02ADA} = {C6658DE0-2B2F-47F0-BB61-2CA66D435C09}
{9F8AE7FB-E5F9-4DCB-9CF8-0362B3D18DAA} = {9B7776E2-0014-4C87-B1F4-22FB0BC076F1}
{D8130816-C1D9-40A3-9079-F2887FE35EA9} = {9F8AE7FB-E5F9-4DCB-9CF8-0362B3D18DAA}
{820016B7-01CD-4032-8239-6A4E53F1A352} = {9F8AE7FB-E5F9-4DCB-9CF8-0362B3D18DAA}
{55F9B33D-5FAF-4355-97EF-445C93208E85} = {C6658DE0-2B2F-47F0-BB61-2CA66D435C09}
EndGlobalSection
EndGlobal

9
Elsa.sln.DotSettings Normal file
View file

@ -0,0 +1,9 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Computables/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Pomelo/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Populator/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Syntaxes/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=tupled/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unpublish/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unschedule/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=wellknown/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Elsa Workflows
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

8
NuGet.Config Normal file
View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear/>
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
<add key="Jint prereleases" value="https://www.myget.org/F/jint/api/v3/index.json" />
</packageSources>
</configuration>

1
README.md Normal file
View file

@ -0,0 +1 @@
# experimental

48
docker-compose.yml Normal file
View file

@ -0,0 +1,48 @@
version: '3.7'
services:
consul-agent-1: &consul-agent
image: consul:latest
networks:
- consul
command: "agent -retry-join consul-server-bootstrap -client 0.0.0.0"
consul-agent-2:
<<: *consul-agent
consul-agent-3:
<<: *consul-agent
consul-server-1: &consul-server
<<: *consul-agent
command: "agent -server -retry-join consul-server-bootstrap -client 0.0.0.0"
consul-server-2:
<<: *consul-server
consul-server-bootstrap:
<<: *consul-agent
ports:
- "8400:8400"
- "8500:8500"
- "8600:8600"
- "8600:8600/udp"
command: "agent -server -bootstrap-expect 3 -ui -client 0.0.0.0"
mongodb:
image: mongo:latest
ports:
- 127.0.0.1:27017:27017
volumes:
- mongodb_data:/data/db
redis:
image: redis:latest
ports:
- 127.0.0.1:6379:6379
networks:
consul:
volumes:
mongodb_data:

View file

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>Latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\core\Elsa.Core\Elsa.Core.csproj" />
<ProjectReference Include="..\..\runtime\Elsa.Runtime\Elsa.Runtime.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=activities/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=activities_005Chttpendpoint/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=activities_005Chttptrigger/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View file

@ -0,0 +1,9 @@
using Elsa.Activities.Http.Middleware;
using Microsoft.AspNetCore.Builder;
namespace Elsa.Activities.Http.Extensions;
public static class ApplicationBuilderExtensions
{
public static IApplicationBuilder UseHttpActivities(this IApplicationBuilder app) => app.UseMiddleware<HttpTriggerMiddleware>();
}

View file

@ -0,0 +1,13 @@
// ReSharper disable once CheckNamespace
namespace Microsoft.Extensions.DependencyInjection;
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddHttpActivityServices(this IServiceCollection services)
{
return services
.AddHttpContextAccessor();
}
}

View file

@ -0,0 +1,51 @@
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Management.Models;
using Elsa.Models;
namespace Elsa.Activities.Http;
public class HttpTrigger : Trigger
{
[Input] public Input<string> Path { get; set; } = default!;
[Input(
Options = new[] { "GET", "POST", "PUT" },
UIHint = InputUIHints.CheckList
)]
public Input<ICollection<string>> SupportedMethods { get; set; } = new(new[] { HttpMethod.Get.Method });
[Output] public Output<HttpRequestModel>? Result { get; set; }
protected override IEnumerable<object> GetHashInputs(TriggerIndexingContext context)
{
var path = context.ExpressionExecutionContext.Get(Path);
var methods = context.ExpressionExecutionContext.Get(SupportedMethods);
return methods!.Select(x => (path!.ToLowerInvariant(), x.ToLowerInvariant())).Cast<object>().ToArray();
}
protected override void Execute(ActivityExecutionContext context)
{
var bookmarks = CreateBookmarks(context).ToList();
context.SetBookmarks(bookmarks);
}
private IEnumerable<Bookmark> CreateBookmarks(ActivityExecutionContext context)
{
var path = context.Get(Path)!;
var methods = context.Get(SupportedMethods)!;
var hasher = context.GetRequiredService<IHasher>();
var identityGenerator = context.GetRequiredService<IIdentityGenerator>();
foreach (var method in methods)
{
var hashInput = (path.ToLowerInvariant(), method.ToLowerInvariant());
var hash = hasher.Hash(hashInput);
var bookmarkId = identityGenerator.GenerateId();
yield return new Bookmark(bookmarkId, NodeType, hash, Id, context.Id);
}
}
}

View file

@ -0,0 +1,57 @@
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Elsa.Contracts;
using Elsa.Helpers;
using Elsa.Runtime.Contracts;
using Elsa.Runtime.Models;
using Microsoft.AspNetCore.Http;
namespace Elsa.Activities.Http.Middleware;
public class HttpTriggerMiddleware
{
private readonly RequestDelegate _next;
private readonly IHasher _hasher;
public HttpTriggerMiddleware(RequestDelegate next, IHasher hasher)
{
_next = next;
_hasher = hasher;
}
public async Task InvokeAsync(HttpContext httpContext, IWorkflowServer workflowServer)
{
var path = GetPath(httpContext);
var method = httpContext.Request.Method!.ToLowerInvariant();
var abortToken = httpContext.RequestAborted;
var hash = _hasher.Hash((path.ToLowerInvariant(), method.ToLowerInvariant()));
var activityTypeName = TypeNameHelper.GenerateTypeName<HttpTrigger>();
var stimulus = Stimuli.Standard(activityTypeName, hash);
var executionResults = (await workflowServer.ExecuteStimulusAsync(stimulus, abortToken)).ToList();
if (!executionResults.Any())
{
await _next(httpContext);
return;
}
var response = httpContext.Response;
if (!response.HasStarted)
{
response.ContentType = "application/json";
response.StatusCode = StatusCodes.Status200OK;
var model = new
{
workflowInstanceIds = executionResults.Select(x => x.ExecuteWorkflowResult.WorkflowState.Id).ToArray()
};
var json = JsonSerializer.Serialize(model);
await response.WriteAsync(json, abortToken);
}
}
private string GetPath(HttpContext httpContext) => httpContext.Request.Path.Value.ToLowerInvariant();
}

View file

@ -0,0 +1,8 @@
using System;
namespace Elsa.Activities.Http;
public class HttpRequestModel
{
public Uri Url { get; set; } = default!;
}

View file

@ -0,0 +1,26 @@
using System.Net;
using System.Threading.Tasks;
using Elsa.Models;
using Microsoft.AspNetCore.Http;
namespace Elsa.Activities.Http;
public class WriteHttpResponse : Activity
{
public Input<HttpStatusCode> StatusCode { get; set; } = new(HttpStatusCode.OK);
public Input<string?> Content { get; set; } = new("");
public override async ValueTask ExecuteAsync(ActivityExecutionContext context)
{
var httpContextAccessor = context.GetRequiredService<IHttpContextAccessor>();
var httpContext = httpContextAccessor.HttpContext;
var response = httpContext.Response;
response.StatusCode = (int)context.Get(StatusCode);
var content = context.Get(Content);
if (content != null)
await response.WriteAsync(content, context.CancellationToken);
}
}

View file

@ -0,0 +1,2 @@
using System;
[assembly: CLSCompliant(true)]

View file

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>Latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\core\Elsa.Core\Elsa.Core.csproj" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,10 @@
using System;
using Elsa.Attributes;
using Elsa.Models;
namespace Elsa.Activities.Timers;
public class TimerTrigger : Trigger
{
[Input] public Input<TimeSpan> Interval { get; set; } = default!;
}

View file

@ -0,0 +1,26 @@
using System.Net;
using System.Threading.Tasks;
using Elsa.Models;
using Elsa.Runtime.Contracts;
using Elsa.Runtime.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Api.ApiResults;
public class DispatchWorkflowResult : IResult
{
public DispatchWorkflowResult(Workflow workflow) => Workflow = workflow;
public Workflow Workflow { get; }
public async Task ExecuteAsync(HttpContext httpContext)
{
var response = httpContext.Response;
var workflowInvoker = httpContext.RequestServices.GetRequiredService<IWorkflowInvoker>();
var (definitionId, version, _) = Workflow.Identity;
var result = await workflowInvoker.DispatchAsync(new DispatchWorkflowDefinitionRequest(definitionId, version));
response.StatusCode = (int)HttpStatusCode.OK;
await response.WriteAsJsonAsync(result, httpContext.RequestAborted);
}
}

View file

@ -0,0 +1,9 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace Elsa.Api.ApiResults;
public class EmptyResult : IResult
{
public Task ExecuteAsync(HttpContext httpContext) => Task.CompletedTask;
}

View file

@ -0,0 +1,27 @@
using System.Threading;
using System.Threading.Tasks;
using Elsa.Models;
using Elsa.Runtime.Contracts;
using Elsa.Runtime.Models;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Api.ApiResults;
public class ExecuteWorkflowResult : IResult
{
public ExecuteWorkflowResult(Workflow workflow) => Workflow = workflow;
public Workflow Workflow { get; }
public async Task ExecuteAsync(HttpContext httpContext)
{
var response = httpContext.Response;
var workflowInvoker = httpContext.RequestServices.GetRequiredService<IWorkflowInvoker>();
var (definitionId, version, _) = Workflow.Identity;
var executeRequest = new ExecuteWorkflowDefinitionRequest(definitionId, version);
var result = await workflowInvoker.ExecuteAsync(executeRequest, CancellationToken.None);
if (!response.HasStarted)
await response.WriteAsJsonAsync(result, httpContext.RequestAborted);
}
}

View file

@ -0,0 +1,38 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Elsa.Runtime.Contracts;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Api.ApiResults;
public class ProcessStimulusResult : IResult
{
public ProcessStimulusResult(IStimulus stimulus)
{
Stimulus = stimulus;
}
public IStimulus Stimulus { get; }
public async Task ExecuteAsync(HttpContext httpContext)
{
var response = httpContext.Response;
var stimulusInterpreter = httpContext.RequestServices.GetRequiredService<IStimulusInterpreter>();
var abortToken = httpContext.RequestAborted;
var instructions = await stimulusInterpreter.GetExecutionInstructionsAsync(Stimulus, abortToken);
var instructionExecutor = httpContext.RequestServices.GetRequiredService<IWorkflowInstructionExecutor>();
var executionResults = (await instructionExecutor.ExecuteInstructionsAsync(instructions, CancellationToken.None)).ToList();
if (!response.HasStarted)
{
var model = new
{
Results = executionResults
};
await response.WriteAsJsonAsync(model, httpContext.RequestAborted);
}
}
}

View file

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\core\Elsa.Management\Elsa.Management.csproj" />
<ProjectReference Include="..\..\runtime\Elsa.Runtime\Elsa.Runtime.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="HostedServices" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,28 @@
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using Elsa.Management.Contracts;
using Elsa.Management.Serialization.Converters;
using Microsoft.AspNetCore.Http;
namespace Elsa.Api.Endpoints.ActivityDescriptors;
public static partial class ActivityDescriptors
{
public static IResult ListAsync(IActivityRegistry registry, IWellKnownTypeRegistry wellKnownTypeRegistry)
{
var descriptors = registry.ListAll().ToList();
var model = new
{
ActivityDescriptors = descriptors
};
return Results.Json(model, new JsonSerializerOptions
{
Converters = { new TypeJsonConverter(wellKnownTypeRegistry) },
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault
});
}
}

View file

@ -0,0 +1,32 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
namespace Elsa.Api.Endpoints.ActivityDescriptors;
public class ActivityDescriptorsResource
{
private readonly IEndpointRouteBuilder _endpoints;
public ActivityDescriptorsResource(IEndpointRouteBuilder endpoints)
{
_endpoints = endpoints;
}
public ActivityDescriptorsResource List()
{
_endpoints.MapGet("api/descriptors/activities", ActivityDescriptors.ListAsync);
return this;
}
}
public static class ActivityDescriptorsResourceExtensions
{
public static IEndpointRouteBuilder MapActivityDescriptors(this IEndpointRouteBuilder endpoints, Action<ActivityDescriptorsResource> configureResource)
{
configureResource(new(endpoints));
return endpoints;
}
public static IEndpointRouteBuilder MapActivityDescriptors(this IEndpointRouteBuilder endpoints) => endpoints.MapActivityDescriptors(x => x.List());
}

View file

@ -0,0 +1,32 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
namespace Elsa.Api.Endpoints.Events;
public class EventsResource
{
private readonly IEndpointRouteBuilder _endpoints;
public EventsResource(IEndpointRouteBuilder endpoints)
{
_endpoints = endpoints;
}
public EventsResource Trigger()
{
_endpoints.MapPost("api/events/{eventName}/trigger", Events.Trigger.Handle);
return this;
}
}
public static class EventsResourceExtensions
{
public static IEndpointRouteBuilder MapEvents(this IEndpointRouteBuilder endpoints, Action<EventsResource> configureResource)
{
configureResource(new(endpoints));
return endpoints;
}
public static IEndpointRouteBuilder MapEvents(this IEndpointRouteBuilder endpoints) => endpoints.MapEvents(x => x.Trigger());
}

View file

@ -0,0 +1,17 @@
using Elsa.Activities.Primitives;
using Elsa.Api.ApiResults;
using Elsa.Contracts;
using Elsa.Runtime.Models;
using Microsoft.AspNetCore.Http;
namespace Elsa.Api.Endpoints.Events;
public static class Trigger
{
public static IResult Handle(string eventName, IHasher hasher)
{
var hash = hasher.Hash(eventName);
var stimulus = Stimuli.Standard(nameof(Event), hash);
return new ProcessStimulusResult(stimulus);
}
}

View file

@ -0,0 +1,28 @@
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using Elsa.Management.Contracts;
using Elsa.Management.Serialization.Converters;
using Microsoft.AspNetCore.Http;
namespace Elsa.Api.Endpoints.TriggerDescriptors;
public static partial class TriggerDescriptors
{
public static IResult ListAsync(ITriggerRegistry registry, IWellKnownTypeRegistry wellKnownTypeRegistry)
{
var descriptors = registry.ListAll().ToList();
var model = new
{
TriggerDescriptors = descriptors
};
return Results.Json(model, new JsonSerializerOptions
{
Converters = { new TypeJsonConverter(wellKnownTypeRegistry) },
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingDefault
});
}
}

View file

@ -0,0 +1,32 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
namespace Elsa.Api.Endpoints.TriggerDescriptors;
public class TriggerDescriptorsResource
{
private readonly IEndpointRouteBuilder _endpoints;
public TriggerDescriptorsResource(IEndpointRouteBuilder endpoints)
{
_endpoints = endpoints;
}
public TriggerDescriptorsResource List()
{
_endpoints.MapGet("api/descriptors/triggers", TriggerDescriptors.ListAsync);
return this;
}
}
public static class TriggerDescriptorsResourceExtensions
{
public static IEndpointRouteBuilder MapTriggerDescriptors(this IEndpointRouteBuilder endpoints, Action<TriggerDescriptorsResource> configureResource)
{
configureResource(new(endpoints));
return endpoints;
}
public static IEndpointRouteBuilder MapTriggerDescriptors(this IEndpointRouteBuilder endpoints) => endpoints.MapTriggerDescriptors(x => x.List());
}

View file

@ -0,0 +1,19 @@
using System.Threading;
using System.Threading.Tasks;
using Elsa.Management.Serialization;
using Elsa.Mediator.Contracts;
using Elsa.Persistence.Requests;
using Microsoft.AspNetCore.Http;
namespace Elsa.Api.Endpoints.WorkflowInstances;
public static partial class WorkflowInstances
{
public static async Task<IResult> GetAsync(IRequestSender requestSender, WorkflowSerializerOptionsProvider serializerOptionsProvider, string id, CancellationToken cancellationToken)
{
var serializerOptions = serializerOptionsProvider.CreateSerializerOptions();
var request = new FindWorkflowInstance(id);
var workflowInstance = await requestSender.RequestAsync(request, cancellationToken);
return workflowInstance != null ? Results.Json(workflowInstance, serializerOptions, statusCode: StatusCodes.Status200OK) : Results.NotFound();
}
}

View file

@ -0,0 +1,36 @@
using System.Threading;
using System.Threading.Tasks;
using Elsa.Management.Serialization;
using Elsa.Mediator.Contracts;
using Elsa.Persistence.Entities;
using Elsa.Persistence.Requests;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Elsa.Api.Endpoints.WorkflowInstances;
public static partial class WorkflowInstances
{
public static async Task<IResult> ListAsync(
IRequestSender requestSender,
WorkflowSerializerOptionsProvider serializerOptionsProvider,
CancellationToken cancellationToken,
[FromQuery] int? page,
[FromQuery] int? pageSize,
[FromQuery] string? searchTerm,
[FromQuery] string? definitionId,
[FromQuery] string? correlationId,
[FromQuery] int? version,
[FromQuery] WorkflowStatus? workflowStatus,
[FromQuery] OrderBy? orderBy,
[FromQuery] OrderDirection? orderDirection)
{
var serializerOptions = serializerOptionsProvider.CreateSerializerOptions();
var skip = page * pageSize;
var take = pageSize;
var request = new ListWorkflowInstanceSummaries(searchTerm, definitionId, version, correlationId, workflowStatus, orderBy ?? OrderBy.Created, orderDirection ?? OrderDirection.Ascending, skip ?? 0, take ?? 50);
var summaries = await requestSender.RequestAsync(request, cancellationToken);
return Results.Json(summaries, serializerOptions, statusCode: StatusCodes.Status200OK);
}
}

View file

@ -0,0 +1,28 @@
using System;
using Microsoft.AspNetCore.Routing;
namespace Elsa.Api.Endpoints.WorkflowInstances;
public class WorkflowInstancesResource : ResourceBase<WorkflowInstancesResource>
{
public WorkflowInstancesResource(IEndpointRouteBuilder endpoints) : base(endpoints)
{
}
public WorkflowInstancesResource List() => MapGet("api/workflow-instances", WorkflowInstances.ListAsync);
public WorkflowInstancesResource Get() => MapGet("api/workflow-instances/{id}", WorkflowInstances.GetAsync);
}
public static class WorkflowsResourceExtensions
{
public static IEndpointRouteBuilder MapWorkflowInstances(this IEndpointRouteBuilder endpoints, Action<WorkflowInstancesResource> configureResource)
{
configureResource(new(endpoints));
return endpoints;
}
public static IEndpointRouteBuilder MapWorkflowInstances(this IEndpointRouteBuilder endpoints) => endpoints.MapWorkflowInstances(x => x
.List()
.Get()
);
}

View file

@ -0,0 +1,17 @@
using System.Threading;
using System.Threading.Tasks;
using Elsa.Api.ApiResults;
using Elsa.Persistence.Models;
using Elsa.Runtime.Contracts;
using Microsoft.AspNetCore.Http;
namespace Elsa.Api.Endpoints.Workflows;
public static partial class Workflows
{
public static async Task<IResult> DispatchAsync(string definitionId, IWorkflowRegistry workflowRegistry, HttpResponse response, CancellationToken cancellationToken)
{
var workflow = await workflowRegistry.FindByIdAsync(definitionId, VersionOptions.Published, cancellationToken);
return workflow == null ? Results.NotFound() : new DispatchWorkflowResult(workflow);
}
}

View file

@ -0,0 +1,17 @@
using System.Threading;
using System.Threading.Tasks;
using Elsa.Api.ApiResults;
using Elsa.Persistence.Models;
using Elsa.Runtime.Contracts;
using Microsoft.AspNetCore.Http;
namespace Elsa.Api.Endpoints.Workflows;
public static partial class Workflows
{
public static async Task<IResult> ExecuteAsync(string definitionId, IWorkflowRegistry workflowRegistry, HttpResponse response, CancellationToken cancellationToken)
{
var workflow = await workflowRegistry.FindByIdAsync(definitionId, VersionOptions.Published, cancellationToken);
return workflow == null ? Results.NotFound() : new ExecuteWorkflowResult(workflow);
}
}

View file

@ -0,0 +1,26 @@
using System.Threading;
using System.Threading.Tasks;
using Elsa.Management.Serialization;
using Elsa.Mediator.Contracts;
using Elsa.Persistence.Models;
using Elsa.Persistence.Requests;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Elsa.Api.Endpoints.Workflows;
public static partial class Workflows
{
public static async Task<IResult> Get(
IRequestSender requestSender,
WorkflowSerializerOptionsProvider serializerOptionsProvider,
CancellationToken cancellationToken,
[FromRoute] string definitionId,
[FromQuery] string? versionOptions = default)
{
var serializerOptions = serializerOptionsProvider.CreateSerializerOptions();
var parsedVersionOptions = versionOptions != null ? VersionOptions.FromString(versionOptions) : VersionOptions.Latest;
var workflow = await requestSender.RequestAsync(new FindWorkflow(definitionId, parsedVersionOptions), cancellationToken);
return workflow == null ? Results.NotFound() : Results.Json(workflow, serializerOptions, statusCode: StatusCodes.Status200OK);
}
}

View file

@ -0,0 +1,29 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Elsa.Management.Serialization;
using Elsa.Mediator.Contracts;
using Elsa.Persistence.Models;
using Elsa.Persistence.Requests;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Elsa.Api.Endpoints.Workflows;
public static partial class Workflows
{
public static async Task<IResult> GetManyAsync(
IRequestSender requestSender,
WorkflowSerializerOptionsProvider serializerOptionsProvider,
CancellationToken cancellationToken,
[FromQuery] string? definitionIds = default,
[FromQuery] string? versionOptions = default)
{
var serializerOptions = serializerOptionsProvider.CreateSerializerOptions();
var splitIds = definitionIds?.Split(',', StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
var parsedVersionOptions = versionOptions != null ? VersionOptions.FromString(versionOptions) : VersionOptions.Latest;
var workflowSummaries = await requestSender.RequestAsync(new FindManyWorkflowDefinitions(splitIds, parsedVersionOptions), cancellationToken);
return Results.Json(workflowSummaries, serializerOptions, statusCode: StatusCodes.Status200OK);
}
}

View file

@ -0,0 +1,30 @@
using System.Threading;
using System.Threading.Tasks;
using Elsa.Management.Serialization;
using Elsa.Mediator.Contracts;
using Elsa.Persistence.Models;
using Elsa.Persistence.Requests;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Elsa.Api.Endpoints.Workflows;
public static partial class Workflows
{
public static async Task<IResult> ListAsync(
IRequestSender requestSender,
WorkflowSerializerOptionsProvider serializerOptionsProvider,
CancellationToken cancellationToken,
[FromQuery] string? versionOptions,
[FromQuery] int? page,
[FromQuery] int? pageSize)
{
var serializerOptions = serializerOptionsProvider.CreateSerializerOptions();
var skip = page * pageSize;
var take = pageSize;
var parsedVersionOptions = versionOptions != null ? VersionOptions.FromString(versionOptions) : default;
var workflowSummaries = await requestSender.RequestAsync(new ListWorkflowSummaries(parsedVersionOptions, skip, take), cancellationToken);
return Results.Json(workflowSummaries, serializerOptions, statusCode: StatusCodes.Status200OK);
}
}

View file

@ -0,0 +1,70 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Elsa.Activities.Workflows;
using Elsa.Contracts;
using Elsa.Management.Contracts;
using Elsa.Management.Serialization;
using Elsa.Persistence.Mappers;
using Microsoft.AspNetCore.Http;
namespace Elsa.Api.Endpoints.Workflows;
public static partial class Workflows
{
public record SaveWorkflowRequest(
string? DefinitionId,
string? Name,
string? Description,
IActivity? Root,
ICollection<ITrigger>? Triggers,
bool Publish);
public static async Task<IResult> PostAsync(
HttpContext httpContext,
WorkflowSerializerOptionsProvider serializerOptionsProvider,
IWorkflowPublisher workflowPublisher,
WorkflowDefinitionMapper mapper,
CancellationToken cancellationToken)
{
var serializerOptions = serializerOptionsProvider.CreateSerializerOptions();
var model = (await httpContext.Request.ReadFromJsonAsync<SaveWorkflowRequest>(serializerOptions, cancellationToken))!;
var definitionId = model.DefinitionId;
// Get a workflow draft version.
var draft = !string.IsNullOrWhiteSpace(definitionId)
? await workflowPublisher.GetDraftAsync(definitionId, cancellationToken)
: default;
var isNew = draft == null;
// Create a new workflow in case no existing definition was found.
if (draft == null)
{
draft = workflowPublisher.New();
if (!string.IsNullOrWhiteSpace(definitionId))
draft = draft.WithDefinitionId(definitionId);
}
// Update the draft with the received model.
var root = model.Root ?? new Sequence();
var triggers = model.Triggers ?? new List<ITrigger>();
draft = draft with
{
Root = root,
Triggers = triggers,
Metadata = draft.Metadata with
{
Name = model.Name,
Description = model.Description
}
};
draft = model.Publish ? await workflowPublisher.PublishAsync(draft, cancellationToken) : await workflowPublisher.SaveDraftAsync(draft, cancellationToken);
var statusCode = isNew ? StatusCodes.Status201Created : StatusCodes.Status200OK;
return Results.Json(draft, serializerOptions, statusCode: statusCode);
}
}

View file

@ -0,0 +1,36 @@
using System;
using Microsoft.AspNetCore.Routing;
namespace Elsa.Api.Endpoints.Workflows;
public class WorkflowsResource : ResourceBase<WorkflowsResource>
{
public WorkflowsResource(IEndpointRouteBuilder endpoints) : base(endpoints)
{
}
public WorkflowsResource Post() => MapPost("api/workflows", Workflows.PostAsync);
public WorkflowsResource List() => MapGet("api/workflows", Workflows.ListAsync);
public WorkflowsResource GetMany() => MapGet("api/workflows/set", Workflows.GetManyAsync);
public WorkflowsResource Get() => MapGet("api/workflows/{definitionId}", Workflows.Get);
public WorkflowsResource Execute() => MapPost("api/workflows/{definitionId}/execute", Workflows.ExecuteAsync);
public WorkflowsResource Dispatch() => MapPost("api/workflows/{definitionId}/dispatch", Workflows.DispatchAsync);
}
public static class WorkflowsResourceExtensions
{
public static IEndpointRouteBuilder MapWorkflows(this IEndpointRouteBuilder endpoints, Action<WorkflowsResource> configureResource)
{
configureResource(new(endpoints));
return endpoints;
}
public static IEndpointRouteBuilder MapWorkflows(this IEndpointRouteBuilder endpoints) => endpoints.MapWorkflows(x => x
.Post()
.Execute()
.Dispatch()
.List()
.GetMany()
.Get()
);
}

View file

@ -0,0 +1,9 @@
using Elsa.Api.Middleware;
using Microsoft.AspNetCore.Builder;
namespace Elsa.Api.Extensions;
public static class ApplicationBuilderExtensions
{
public static IApplicationBuilder UseJsonSerializationErrorHandler(this IApplicationBuilder app) => app.UseMiddleware<JsonSerializationErrorHandlerMiddleware>();
}

View file

@ -0,0 +1,18 @@
using Elsa.Api.Endpoints.ActivityDescriptors;
using Elsa.Api.Endpoints.Events;
using Elsa.Api.Endpoints.TriggerDescriptors;
using Elsa.Api.Endpoints.WorkflowInstances;
using Elsa.Api.Endpoints.Workflows;
using Microsoft.AspNetCore.Routing;
namespace Elsa.Api.Extensions;
public static class EndpointRouteBuilderExtensions
{
public static IEndpointRouteBuilder MapElsaApiEndpoints(this IEndpointRouteBuilder endpoints) => endpoints
.MapWorkflows()
.MapWorkflowInstances()
.MapActivityDescriptors()
.MapTriggerDescriptors()
.MapEvents();
}

View file

@ -0,0 +1,43 @@
using System;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace Elsa.Api.Middleware;
/// <summary>
/// Catches JSON serialization errors during POST requests and returns Bad Request responses.
/// </summary>
public class JsonSerializationErrorHandlerMiddleware
{
private readonly RequestDelegate _next;
public JsonSerializationErrorHandlerMiddleware(RequestDelegate next) => _next = next;
public async Task InvokeAsync(HttpContext httpContext)
{
var method = httpContext.Request.Method;
// If the HTTP verb is anything but POST or PUT, do nothing.
if (!string.Equals(method, "POST", StringComparison.InvariantCultureIgnoreCase) && !string.Equals(method, "PUT", StringComparison.InvariantCultureIgnoreCase))
{
await _next(httpContext);
return;
}
try
{
await _next(httpContext);
}
catch (JsonException e)
{
var model = new
{
ModelBindingError = e.Message
};
var result = Results.BadRequest(model);
await result.ExecuteAsync(httpContext);
}
}
}

View file

@ -0,0 +1,23 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;
namespace Elsa.Api;
public abstract class ResourceBase<T> where T:ResourceBase<T>
{
protected ResourceBase(IEndpointRouteBuilder endpoints) => Endpoints = endpoints;
protected IEndpointRouteBuilder Endpoints { get; }
protected T MapGet(string pattern, Delegate handler)
{
Endpoints.MapGet(pattern, handler);
return (T)this;
}
protected T MapPost(string pattern, Delegate handler)
{
Endpoints.MapPost(pattern, handler);
return (T)this;
}
}

View file

@ -0,0 +1,21 @@
using Elsa.Attributes;
using Elsa.Models;
namespace Elsa.Activities.Console;
public class ReadLine : Activity
{
public ReadLine()
{
}
public ReadLine(Variable variable, Func<object?, object?>? valueConverter = default) => Output = new Output<string?>(variable, valueConverter);
[Output] public Output<string?>? Output { get; set; }
protected override void Execute(ActivityExecutionContext context)
{
var text = System.Console.ReadLine();
context.Set(Output, text);
}
}

View file

@ -0,0 +1,37 @@
using System.ComponentModel;
using Elsa.Models;
namespace Elsa.Activities.Console;
public class WriteLine : Activity
{
public WriteLine()
{
}
public WriteLine(string text) : this(new Literal<string>(text))
{
}
public WriteLine(Func<string> text) : this(new DelegateReference<string>(text))
{
}
public WriteLine(Func<ExpressionExecutionContext, string?> text) : this(new DelegateReference<string?>(text))
{
}
public WriteLine(Variable<string> variable) => Text = new Input<string>(variable);
public WriteLine(Literal<string> literal) => Text = new Input<string>(literal);
public WriteLine(DelegateReference delegateExpression) => Text = new Input<string>(delegateExpression);
public WriteLine(Input<string> text) => Text = text;
[Description("The text to write.")]
public Input<string> Text { get; set; } = default!;
protected override void Execute(ActivityExecutionContext context)
{
var text = context.Get(Text);
System.Console.WriteLine(text);
}
}

View file

@ -0,0 +1,70 @@
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Activities.ControlFlow;
public enum ForOperator
{
LessThan,
LessThanOrEqual,
GreaterThan,
GreaterThanOrEqual
}
public class For : Activity
{
public Input<int> Start { get; set; } = new(0);
public Input<int> End { get; set; } = new(0);
public Input<int> Step { get; set; } = new(1);
public Input<ForOperator> Operator { get; set; } = new(ForOperator.LessThanOrEqual);
[Outbound] public IActivity? Body { get; set; }
public Variable<int?> CurrentValue { get; set; } = new();
protected override void Execute(ActivityExecutionContext context)
{
var iterateNode = Body;
if (iterateNode == null)
return;
context.ExpressionExecutionContext.Register.Declare(CurrentValue);
HandleIteration(context);
}
private void HandleIteration(ActivityExecutionContext context)
{
var iterateNode = Body!;
var end = context.Get(End);
var currentValue = CurrentValue.Get<int?>(context.ExpressionExecutionContext);
// Initialize or increment.
var start = context.Get(Start);
var step = context.Get(Step);
var op = context.Get(Operator);
currentValue = currentValue == null ? start : currentValue + step;
var loop = op switch
{
ForOperator.LessThan => currentValue < end,
ForOperator.LessThanOrEqual => currentValue <= end,
ForOperator.GreaterThan => currentValue > end,
ForOperator.GreaterThanOrEqual => currentValue >= end,
_ => throw new NotSupportedException()
};
if (loop)
{
context.ScheduleActivity(iterateNode, OnChildComplete);
// Update loop variable.
CurrentValue.Set(context.ExpressionExecutionContext, currentValue);
}
}
private ValueTask OnChildComplete(ActivityExecutionContext completedActivityExecutionContext, ActivityExecutionContext ownerActivityExecutionContext)
{
HandleIteration(ownerActivityExecutionContext);
return ValueTask.CompletedTask;
}
}

View file

@ -0,0 +1,44 @@
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Activities.ControlFlow;
public class ForEach<T> : Activity
{
[Input] public Input<ICollection<T>> Items { get; set; } = new(Array.Empty<T>());
[Outbound] public IActivity Body { get; set; } = default!;
public Variable<T> CurrentValue { get; set; } = new();
private const string CurrentIndexProperty = "CurrentIndex";
protected override void Execute(ActivityExecutionContext context)
{
// Declare looping variable.
context.ExpressionExecutionContext.Register.Declare(CurrentValue);
// Execute first iteration.
HandleIteration(context);
}
private void HandleIteration(ActivityExecutionContext context)
{
var currentIndex = context.GetProperty<int>(CurrentIndexProperty);
var items = context.Get(Items)!.ToList();
if (currentIndex >= items.Count)
return;
var currentItem = items[currentIndex];
CurrentValue.Set(context, currentItem);
context.ScheduleActivity(Body, OnChildCompleted);
// Increment index.
context.UpdateProperty<int>(CurrentIndexProperty, x => x + 1);
}
private ValueTask OnChildCompleted(ActivityExecutionContext context, ActivityExecutionContext childContext)
{
HandleIteration(context);
return ValueTask.CompletedTask;
}
}

View file

@ -0,0 +1,67 @@
using System.Collections.Immutable;
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Extensions;
using Elsa.Models;
namespace Elsa.Activities.ControlFlow;
public class Fork : Activity
{
[Input] public Input<JoinMode> JoinMode { get; set; } = new(ControlFlow.JoinMode.WaitAny);
[Outbound] public ICollection<IActivity> Branches { get; set; } = new List<IActivity>();
protected override void Execute(ActivityExecutionContext context) => context.ScheduleActivities(Branches.Reverse(), CompleteChildAsync);
private ValueTask CompleteChildAsync(ActivityExecutionContext context, ActivityExecutionContext childContext)
{
OnChildCompleted(context, childContext);
return ValueTask.CompletedTask;
}
private void OnChildCompleted(ActivityExecutionContext context, ActivityExecutionContext childContext)
{
var completedChildActivityId = childContext.Activity.Id;
// Append activity to set of completed activities.
var completedActivityIds = context.UpdateProperty<HashSet<string>>("Completed", set =>
{
set ??= new HashSet<string>();
set.Add(completedChildActivityId);
return set;
});
var allChildActivityIds = Branches.Select(x => x.Id).ToImmutableHashSet();
var joinMode = context.Get(JoinMode);
switch (joinMode)
{
case ControlFlow.JoinMode.WaitAny:
{
// Remove any and all bookmarks from other branches.
RemoveBookmarks(context);
}
break;
case ControlFlow.JoinMode.WaitAll:
{
var allSet = allChildActivityIds.All(x => completedActivityIds.Contains(x));
if (!allSet)
context.PreventContinuation();
}
break;
}
}
private void RemoveBookmarks(ActivityExecutionContext context)
{
// Find all descendants for each branch and remove any associated bookmarks.
var workflowExecutionContext = context.WorkflowExecutionContext;
var forkNode = context.ActivityNode;
var branchNodes = forkNode.Children;
var branchDescendantActivityIds = branchNodes.SelectMany(x => x.Flatten()).Select(x => x.Activity.Id).ToHashSet();
var bookmarksToRemove = workflowExecutionContext.Bookmarks.Where(x => branchDescendantActivityIds.Contains(x.ActivityId)).ToList();
workflowExecutionContext.UnregisterBookmarks(bookmarksToRemove);
}
}

View file

@ -0,0 +1,26 @@
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Activities.ControlFlow;
public class If : Activity
{
[Input] public Input<bool> Condition { get; set; } = new(new Literal<bool>(false));
[Outbound] public IActivity? Then { get; set; }
[Outbound] public IActivity? Else { get; set; }
protected override void Execute(ActivityExecutionContext context)
{
var result = context.Get(Condition);
var nextNode = result ? Then : Else;
if (nextNode != null)
context.ScheduleActivity(nextNode, OnChildCompletedAsync);
}
private ValueTask OnChildCompletedAsync(ActivityExecutionContext context, ActivityExecutionContext childContext)
{
return ValueTask.CompletedTask;
}
}

View file

@ -0,0 +1,85 @@
using Elsa.Attributes;
using Elsa.Models;
namespace Elsa.Activities.ControlFlow;
public enum JoinMode
{
WaitAny,
WaitAll
}
public class Join : Activity
{
public Join(JoinMode joinMode = ControlFlow.JoinMode.WaitAny)
{
JoinMode = new Input<JoinMode>(joinMode);
}
[Input] public Input<JoinMode> JoinMode { get; set; }
protected override void Execute(ActivityExecutionContext context)
{
var joinMode = context.Get(JoinMode);
switch (joinMode)
{
case ControlFlow.JoinMode.WaitAny:
{
// Remove any and all bookmarks from other branches.
RemoveBookmarks(context);
}
break;
case ControlFlow.JoinMode.WaitAll:
{
var workflowExecutionContext = context.WorkflowExecutionContext;
// Record last executed activity ID.
var lastActivityInstanceId = context.WorkflowExecutionContext.ExecutionLog.LastOrDefault()?.ActivityInstanceId;
var lastActivityId = lastActivityInstanceId != null ? workflowExecutionContext.ActivityExecutionContexts.FirstOrDefault(x => x.Id == lastActivityInstanceId)?.Activity.Id : default;
if (lastActivityId != null)
{
var recordedActivitiesKey = $"{Id}:RecordedActivities";
var recordedActivityIds = workflowExecutionContext.UpdateProperty<HashSet<string>>(recordedActivitiesKey, set =>
{
set ??= new HashSet<string>();
set.Add(lastActivityId);
return set;
});
var inboundActivityIds = context.ActivityNode.Parents.Select(x => x.Activity.Id).ToHashSet();
var allSet = inboundActivityIds.All(x => recordedActivityIds.Contains(x));
if (!allSet)
{
// If not all inbound activities have executed yet, instruct engine to not complete this activity.
context.PreventContinuation();
}
else
{
// If all inbound activities have executed, clean global state.
workflowExecutionContext.Properties.Remove(recordedActivitiesKey);
}
}
break;
}
}
}
private void RemoveBookmarks(ActivityExecutionContext context)
{
var workflowExecutionContext = context.WorkflowExecutionContext;
// Remove all bookmarks of ancestors and siblings.
var joinNode = context.ActivityNode;
var ancestors = joinNode.Ancestors().Select(x => x.Activity.Id);
var siblingsAndCousins = joinNode.SiblingsAndCousins().Select(x => x.Activity.Id);
var activitiesInPath = ancestors.Concat(siblingsAndCousins).ToHashSet();
var bookmarksToRemove = workflowExecutionContext.Bookmarks.Where(x => activitiesInPath.Contains(x.ActivityId)).ToList();
// Remove any bookmarks of any ancestors.
workflowExecutionContext.UnregisterBookmarks(bookmarksToRemove);
}
}

View file

@ -0,0 +1,44 @@
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Activities.ControlFlow;
public class ParallelForEach<T> : Activity
{
private const string CollectedCountProperty = nameof(CollectedCountProperty);
[Input] public Input<ICollection<T>> Items { get; set; } = new(Array.Empty<T>());
[Outbound] public IActivity Body { get; set; } = default!;
public Variable<T> CurrentValue { get; set; } = new();
protected override void Execute(ActivityExecutionContext context)
{
// Declare looping variable.
context.ExpressionExecutionContext.Register.Declare(CurrentValue);
var items = context.Get(Items)!.Reverse().ToList();
foreach (var item in items)
{
var localVariable = new Variable<T>(item)
{
// "Capture" the CurrentValues variable by use same ID so that outer scope variable can access inner scope variable.
Id = CurrentValue.Id
};
// Schedule a body of work for each item.
context.ScheduleActivity(Body, OnChildCompleted, new[]{localVariable});
}
}
private ValueTask OnChildCompleted(ActivityExecutionContext context, ActivityExecutionContext childContext)
{
var itemCount = context.Get(Items)!.Count;
var collectedCount = context.UpdateProperty<int>(CollectedCountProperty, count => count + 1);
// Prevent next sibling from executing while not all scheduled activities have completed.
if(collectedCount < itemCount)
context.PreventContinuation();
return ValueTask.CompletedTask;
}
}

View file

@ -0,0 +1,27 @@
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Activities.ControlFlow;
public class While : Activity
{
[Input] public Input<bool> Condition { get; set; } = new(false);
[Outbound] public IActivity Body { get; set; } = default!;
protected override void Execute(ActivityExecutionContext context)
{
var loop = context.Get(Condition);
if(loop)
context.ScheduleActivity(Body, OnBodyCompleted);
}
private async ValueTask OnBodyCompleted(ActivityExecutionContext context, ActivityExecutionContext childContext)
{
var loop = await context.EvaluateAsync(Condition);
if(loop)
context.ScheduleActivity(Body, OnBodyCompleted);
}
}

View file

@ -0,0 +1,40 @@
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Activities.Primitives;
public class Event : Activity
{
public Event()
{
}
public Event(string eventName) : this(new Literal<string>(eventName))
{
}
public Event(Func<string> text) : this(new DelegateReference<string>(text))
{
}
public Event(Func<ExpressionExecutionContext, string?> text) : this(new DelegateReference<string?>(text))
{
}
public Event(Variable<string> variable) => EventName = new Input<string>(variable);
public Event(Literal<string> literal) => EventName = new Input<string>(literal);
public Event(DelegateReference delegateExpression) => EventName = new Input<string>(delegateExpression);
public Event(Input<string> eventName) => EventName = eventName;
[Input] public Input<string> EventName { get; set; } = default!;
[Output] public Output<object?>? Payload { get; set; }
protected override void Execute(ActivityExecutionContext context)
{
var hasher = context.GetRequiredService<IHasher>();
var eventName = context.Get(EventName)!;
var hash = hasher.Hash(eventName);
context.SetBookmark(hash);
}
}

View file

@ -0,0 +1,16 @@
using Elsa.Attributes;
using Elsa.Models;
namespace Elsa.Activities.Primitives;
public class UpdateVariable<T> : Activity
{
[Input] public Input<T> Value { get; set; } = new Input<T>(new Literal<T>());
public Variable<T> Variable { get; set; } = default!;
protected override void Execute(ActivityExecutionContext context)
{
var value = context.Get(Value);
Variable.Set(context, value);
}
}

View file

@ -0,0 +1,5 @@
using Elsa.Contracts;
namespace Elsa.Activities.Workflows;
public record Connection(IActivity Source, IActivity Target, string? SourcePort, string TargetPort);

View file

@ -0,0 +1,28 @@
using System.Collections.ObjectModel;
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Activities.Workflows;
public abstract class Container : Activity, IContainer
{
protected Container()
{
}
protected Container(params IActivity[] activities) => Activities = activities;
[Outbound] public ICollection<IActivity> Activities { get; set; } = new List<IActivity>();
public ICollection<Variable> Variables { get; set; } = new Collection<Variable>();
protected override void Execute(ActivityExecutionContext context)
{
// Register variables.
context.ExpressionExecutionContext.Register.Declare(Variables);
// Schedule children.
ScheduleChildren(context);
}
protected abstract void ScheduleChildren(ActivityExecutionContext context);
}

View file

@ -0,0 +1,38 @@
using System.ComponentModel;
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Activities.Workflows;
[Category("Workflows")]
public class Flowchart : Container
{
[Node] public IActivity? Start { get; set; } = default!;
public ICollection<Connection> Connections { get; set; } = new List<Connection>();
protected override void ScheduleChildren(ActivityExecutionContext context)
{
if (Start == null!)
return;
context.ScheduleActivity(Start, OnChildCompleted);
}
private ValueTask OnChildCompleted(ActivityExecutionContext context, ActivityExecutionContext childContext)
{
ScheduleChildren(context, childContext.Activity);
return ValueTask.CompletedTask;
}
private void ScheduleChildren(ActivityExecutionContext context, IActivity parent)
{
if (parent == null!)
return;
var outboundConnections = Connections.Where(x => x.Source == parent).ToList();
var children = outboundConnections.Select(x => x.Target).ToList();
context.ScheduleActivities(children, OnChildCompleted);
}
}

View file

@ -0,0 +1,43 @@
using System.ComponentModel;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Activities.Workflows;
[Category("Workflows")]
public class Sequence : Container
{
private const string CurrentIndexProperty = "CurrentIndex";
public Sequence()
{
}
public Sequence(params IActivity[] activities) : base(activities)
{
}
protected override void ScheduleChildren(ActivityExecutionContext context)
{
HandleItem(context);
}
private void HandleItem(ActivityExecutionContext context)
{
var currentIndex = context.GetProperty<int>(CurrentIndexProperty);
var childActivities = Activities.ToList();
if (currentIndex >= childActivities.Count)
return;
var nextActivity = childActivities.ElementAt(currentIndex);
context.ScheduleActivity(nextActivity, OnChildCompleted);
context.UpdateProperty<int>(CurrentIndexProperty, x => x + 1);
}
private ValueTask OnChildCompleted(ActivityExecutionContext context, ActivityExecutionContext childContext)
{
HandleItem(context);
return ValueTask.CompletedTask;
}
}

View file

@ -0,0 +1,37 @@
using System.Reflection;
using Elsa.Attributes;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.ActivityNodeResolvers;
public class OutboundActivityNodeResolver : IActivityNodeResolver
{
public int Priority => -1;
public bool GetSupportsActivity(IActivity activity) => activity is Activity;
public IEnumerable<IActivity> GetPorts(IActivity activity) =>
GetSinglePorts(activity)
.Where(x => x != null)
.Select(x => x!)
.ToHashSet();
private static IEnumerable<IActivity?> GetSinglePorts(IActivity activity)
{
var nodeType = activity.GetType();
var ports =
from prop in nodeType.GetProperties(BindingFlags.Public | BindingFlags.Instance)
where typeof(IActivity).IsAssignableFrom(prop.PropertyType) || typeof(IEnumerable<IActivity>).IsAssignableFrom(prop.PropertyType)
let portAttr = prop.GetCustomAttribute<OutboundAttribute>()
let nodeAttr = prop.GetCustomAttribute<NodeAttribute>()
where portAttr != null || nodeAttr != null
let value = prop.GetValue(activity)
let isCollection = GetPropertyIsCollection(prop.PropertyType)
select isCollection ? (IEnumerable<IActivity>)value : new[] { (IActivity)value };
return ports.SelectMany(x => x);
}
private static bool GetPropertyIsCollection(Type propertyType) => typeof(IEnumerable<IActivity>).IsAssignableFrom(propertyType);
}

View file

@ -0,0 +1 @@
[assembly: CLSCompliant(true)]

View file

@ -0,0 +1,12 @@
namespace Elsa.Attributes;
[AttributeUsage(AttributeTargets.Class)]
public class ActivityAttribute : Attribute
{
public ActivityAttribute(string? typeName = default)
{
TypeName = typeName;
}
public string? TypeName { get; }
}

View file

@ -0,0 +1,6 @@
namespace Elsa.Attributes;
[AttributeUsage(AttributeTargets.Property)]
public class InboundAttribute : Attribute
{
}

View file

@ -0,0 +1,72 @@
namespace Elsa.Attributes;
[AttributeUsage(AttributeTargets.Property)]
public class InputAttribute : Attribute
{
public string? Name { get; set; }
/// <summary>
/// A hint to workflow tooling what input control to use.
/// </summary>
public string? UIHint { get; set; }
/// <summary>
/// The user-friendly name of the activity property.
/// </summary>
public string? DisplayName { get; set; }
// /// <summary>
// /// A brief description about this property for workflow tooling to use when displaying activity editors.
// /// </summary>
// public string? Description { get; set; }
/// <summary>
/// A category to group this property with.
/// </summary>
public string? Category { get; set; }
/// <summary>
/// A value representing options specific to a given UI hint.
/// </summary>
public object? Options { get; set; }
/// <summary>
/// The type that provides options. If specified, this overrules any value specified via <see cref="Options"/>.
/// </summary>
public Type? OptionsProvider { get; set; }
/// <summary>
/// A value to order this property by. Properties are displayed in ascending order (lower appears before higher).
/// </summary>
public float Order { get; set; }
/// <summary>
/// The default value to set.
/// </summary>
public object? DefaultValue { get; set; }
/// <summary>
/// The type that provides a default value. When specified, the <see cref="DefaultValue"/> will be ignored.
/// </summary>
public Type? DefaultValueProvider { get; set; }
/// <summary>
/// The syntax to use by default when evaluating the value. Only used when the property definition doesn't have a syntax specified.
/// </summary>
public string? DefaultSyntax { get; set; }
/// <summary>
/// The syntax to use by default when evaluating the value. Only used when the property definition doesn't have a syntax specified.
/// </summary>
public string[]? SupportedSyntaxes { get; set; }
/// <summary>
/// A value indicating whether this property should be displayed but as read-only.
/// </summary>
public bool IsReadOnly { get; set; }
/// <summary>
/// A value indicating whether this property should be visible.
/// </summary>
public bool IsBrowsable { get; set; } = true;
}

View file

@ -0,0 +1,6 @@
namespace Elsa.Attributes;
[AttributeUsage(AttributeTargets.Property)]
public class NodeAttribute : Attribute
{
}

View file

@ -0,0 +1,8 @@
namespace Elsa.Attributes;
[AttributeUsage(AttributeTargets.Property)]
public class OutboundAttribute : Attribute
{
public string? Name { get; set; }
public string? DisplayName { get; set; }
}

View file

@ -0,0 +1,15 @@
namespace Elsa.Attributes;
[AttributeUsage(AttributeTargets.Property)]
public class OutputAttribute : Attribute
{
/// <summary>
/// The technical name of the activity property.
/// </summary>
public string? Name { get; set; }
/// <summary>
/// A brief description about this property for workflow tooling to use when displaying activity editors.
/// </summary>
public string? Description { get; set; }
}

View file

@ -0,0 +1,6 @@
namespace Elsa.Attributes;
[AttributeUsage(AttributeTargets.Property)]
public class StateAttribute : Attribute
{
}

View file

@ -0,0 +1,55 @@
using Elsa.Activities.Workflows;
using Elsa.Contracts;
using Elsa.Models;
namespace Elsa.Builders;
public class WorkflowDefinitionBuilder : IWorkflowDefinitionBuilder
{
public string? Id { get; private set; }
public string? DefinitionId { get; private set; }
public int Version { get; private set; } = 1;
public IActivity? Root { get; private set; }
public ICollection<ITrigger> Triggers { get; } = new List<ITrigger>();
public IWorkflowDefinitionBuilder WithId(string id)
{
Id = id;
return this;
}
public IWorkflowDefinitionBuilder WithDefinitionId(string definitionId)
{
DefinitionId = definitionId;
return this;
}
public IWorkflowDefinitionBuilder WithVersion(int version)
{
Version = version;
return this;
}
public IWorkflowDefinitionBuilder WithRoot(IActivity root)
{
Root = root;
return this;
}
public IWorkflowDefinitionBuilder AddTrigger(ITrigger trigger)
{
Triggers.Add(trigger);
return this;
}
public Workflow BuildWorkflow()
{
var definitionId = DefinitionId ?? Guid.NewGuid().ToString("N");
var id = Id ?? Guid.NewGuid().ToString("N");
var root = Root ?? new Sequence();
var identity = new WorkflowIdentity(definitionId, Version, id);
var publication = WorkflowPublication.LatestAndPublished;
var metadata = new WorkflowMetadata();
return new Workflow(identity, publication, metadata, root, Triggers);
}
}

View file

@ -0,0 +1,6 @@
using Elsa.Models;
namespace Elsa.Contracts;
public delegate ValueTask ExecuteActivityDelegate(ActivityExecutionContext context);
public delegate ValueTask ActivityCompletionCallback(ActivityExecutionContext context, ActivityExecutionContext childContext);

View file

@ -0,0 +1,8 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IActivity : INode
{
ValueTask ExecuteAsync(ActivityExecutionContext context);
}

View file

@ -0,0 +1,10 @@
using Elsa.Pipelines.ActivityExecution;
namespace Elsa.Contracts;
public interface IActivityExecutionBuilder
{
IServiceProvider ServiceProvider { get; }
IActivityExecutionBuilder Use(Func<ActivityMiddlewareDelegate, ActivityMiddlewareDelegate> middleware);
public ActivityMiddlewareDelegate Build();
}

View file

@ -0,0 +1,8 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IActivityExecutionMiddleware
{
ValueTask InvokeAsync(ActivityExecutionContext context);
}

View file

@ -0,0 +1,11 @@
using Elsa.Models;
using Elsa.Pipelines.ActivityExecution;
namespace Elsa.Contracts;
public interface IActivityExecutionPipeline
{
ActivityMiddlewareDelegate Setup(Action<IActivityExecutionBuilder> setup);
ActivityMiddlewareDelegate Pipeline { get; }
Task ExecuteAsync(ActivityExecutionContext context);
}

View file

@ -0,0 +1,14 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IActivityInvoker
{
Task InvokeAsync(
WorkflowExecutionContext workflowExecutionContext,
IActivity activity,
ActivityExecutionContext? owner = default,
IEnumerable<RegisterLocationReference>? locationReferences = default);
Task InvokeAsync(ActivityExecutionContext activityExecutionContext);
}

View file

@ -0,0 +1,8 @@
namespace Elsa.Contracts;
public interface IActivityNodeResolver
{
int Priority { get; }
bool GetSupportsActivity(IActivity activity);
IEnumerable<IActivity> GetPorts(IActivity activity);
}

View file

@ -0,0 +1,11 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IActivityScheduler
{
bool HasAny { get; }
void Push(ActivityWorkItem workItem);
ActivityWorkItem Pop();
IEnumerable<ActivityWorkItem> List();
}

View file

@ -0,0 +1,6 @@
namespace Elsa.Contracts;
public interface IActivitySchedulerFactory
{
IActivityScheduler CreateScheduler();
}

View file

@ -0,0 +1,11 @@
using Elsa.Models;
namespace Elsa.Contracts;
/// <summary>
/// Walks an activity tree starting at the root.
/// </summary>
public interface IActivityWalker
{
ActivityNode Walk(IActivity activity);
}

View file

@ -0,0 +1,8 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IContainer : IActivity
{
ICollection<Variable> Variables { get; }
}

View file

@ -0,0 +1,5 @@
namespace Elsa.Contracts;
public interface IExpression
{
}

View file

@ -0,0 +1,15 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IExpressionEvaluator
{
ValueTask<T?> EvaluateAsync<T>(IExpression input, ExpressionExecutionContext context);
ValueTask<object?> EvaluateAsync(IExpression input, Type returnType, ExpressionExecutionContext context);
}
public static class ExpressionEvaluatorExtensions
{
public static ValueTask<T?> EvaluateAsync<T>(this IExpressionEvaluator evaluator, Input<T> input, ExpressionExecutionContext context) => evaluator.EvaluateAsync<T>(input.Expression, context);
public static ValueTask<object?> EvaluateAsync(this IExpressionEvaluator evaluator, Input input, ExpressionExecutionContext context) => evaluator.EvaluateAsync(input.Expression, input.Type, context);
}

View file

@ -0,0 +1,8 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IExpressionHandler
{
ValueTask<object?> EvaluateAsync(IExpression expression, Type returnType, ExpressionExecutionContext context);
}

View file

@ -0,0 +1,7 @@
namespace Elsa.Contracts;
public interface IExpressionHandlerRegistry
{
void Register(Type expression, Type handler);
IExpressionHandler? GetHandler(IExpression input);
}

View file

@ -0,0 +1,9 @@
namespace Elsa.Contracts;
/// <summary>
/// Computes a hash for a given value.
/// </summary>
public interface IHasher
{
public string Hash(object value);
}

View file

@ -0,0 +1,6 @@
namespace Elsa.Contracts;
public interface IIdentityGenerator
{
string GenerateId();
}

View file

@ -0,0 +1,10 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IIdentityGraphService
{
void AssignIdentities(Workflow workflow);
void AssignIdentities(IActivity root);
void AssignIdentities(ActivityNode root);
}

View file

@ -0,0 +1,8 @@
namespace Elsa.Contracts;
public interface INode
{
string Id { get; set; }
string NodeType { get; set; }
IDictionary<string, object> Metadata { get; set; }
}

View file

@ -0,0 +1,5 @@
namespace Elsa.Contracts;
public interface IReference
{
}

View file

@ -0,0 +1,8 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IScheduledNodeExecuted
{
ValueTask HandleAsync(ActivityExecutionContext context, IActivity owner);
}

View file

@ -0,0 +1,8 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IScopeCompletedHandler
{
ValueTask HandleAsync(ActivityExecutionContext context);
}

View file

@ -0,0 +1,6 @@
namespace Elsa.Contracts;
public interface ISystemClock
{
DateTime UtcNow { get; }
}

View file

@ -0,0 +1,9 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface ITrigger : INode
{
string TriggerType { get; set; }
ValueTask<IEnumerable<object>> GetHashInputsAsync(TriggerIndexingContext context, CancellationToken cancellationToken = default);
}

View file

@ -0,0 +1,16 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IWorkflowDefinitionBuilder
{
string? DefinitionId { get; }
int Version { get; }
IActivity? Root { get; }
ICollection<ITrigger> Triggers { get; }
IWorkflowDefinitionBuilder WithDefinitionId(string definitionId);
IWorkflowDefinitionBuilder WithVersion(int version);
IWorkflowDefinitionBuilder WithRoot(IActivity root);
IWorkflowDefinitionBuilder AddTrigger(ITrigger trigger);
Workflow BuildWorkflow();
}

View file

@ -0,0 +1,20 @@
using Elsa.Models;
using Elsa.State;
namespace Elsa.Contracts;
public interface IWorkflowEngine
{
Task<ExecuteWorkflowResult> ExecuteAsync(Workflow workflow, CancellationToken cancellationToken = default);
Task<ExecuteWorkflowResult> ExecuteAsync(Workflow workflow, WorkflowState workflowState, CancellationToken cancellationToken = default);
Task<ExecuteWorkflowResult> ExecuteAsync(Workflow workflow, WorkflowState workflowState, Bookmark? bookmark, CancellationToken cancellationToken = default);
Task<ExecuteWorkflowResult> ExecuteAsync(WorkflowExecutionContext workflowExecutionContext);
WorkflowExecutionContext CreateWorkflowExecutionContext(
IServiceProvider serviceProvider,
Workflow workflow,
WorkflowState? workflowState = default,
Bookmark? bookmark = default,
ExecuteActivityDelegate? executeActivityDelegate = default,
CancellationToken cancellationToken = default);
}

View file

@ -0,0 +1,11 @@
using Elsa.Pipelines.WorkflowExecution;
namespace Elsa.Contracts;
public interface IWorkflowExecutionBuilder
{
public IDictionary<string, object?> Properties { get; }
IServiceProvider ApplicationServices { get; }
IWorkflowExecutionBuilder Use(Func<WorkflowMiddlewareDelegate, WorkflowMiddlewareDelegate> middleware);
public WorkflowMiddlewareDelegate Build();
}

View file

@ -0,0 +1,8 @@
using Elsa.Models;
namespace Elsa.Contracts;
public interface IWorkflowExecutionMiddleware
{
ValueTask InvokeAsync(WorkflowExecutionContext context);
}

View file

@ -0,0 +1,11 @@
using Elsa.Models;
using Elsa.Pipelines.WorkflowExecution;
namespace Elsa.Contracts;
public interface IWorkflowExecutionPipeline
{
WorkflowMiddlewareDelegate Setup(Action<IWorkflowExecutionBuilder> setup);
WorkflowMiddlewareDelegate Pipeline { get; }
Task ExecuteAsync(WorkflowExecutionContext context);
}

View file

@ -0,0 +1,10 @@
using Elsa.Models;
using Elsa.State;
namespace Elsa.Contracts;
public interface IWorkflowStateSerializer
{
WorkflowState ReadState(WorkflowExecutionContext workflowExecutionContext);
void WriteState(WorkflowExecutionContext workflowExecutionContext, WorkflowState state);
}

View file

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>Elsa</RootNamespace>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="6.0.0-preview.4.21253.7" />
<PackageReference Include="System.Text.Json" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Converters" />
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show more