Skip to content

Commit

Permalink
Merge branch 'main' into feature/domain-event-notification-activity
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmskywalker authored Oct 7, 2024
2 parents aae9220 + 368d8d9 commit 66cc646
Show file tree
Hide file tree
Showing 33 changed files with 2,921 additions and 36 deletions.
9 changes: 5 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
<PackageVersion Include="DistributedLock.Postgres" Version="1.2.0" />
<PackageVersion Include="DistributedLock.Redis" Version="1.0.3" />
<PackageVersion Include="Elastic.Clients.Elasticsearch" Version="8.14.6" />
<PackageVersion Include="Elsa.Studio" Version="3.3.0-preview.524" />
<PackageVersion Include="Elsa.Studio.Core.BlazorWasm" Version="3.3.0-preview.524" />
<PackageVersion Include="Elsa.Studio.Login.BlazorWasm" Version="3.3.0-preview.524" />
<PackageVersion Include="Elsa.Studio.Agents" Version="3.3.0-preview.524" />
<PackageVersion Include="Elsa.Studio" Version="3.3.0-preview.561" />
<PackageVersion Include="Elsa.Studio.Core.BlazorWasm" Version="3.3.0-preview.561" />
<PackageVersion Include="Elsa.Studio.Login.BlazorWasm" Version="3.3.0-preview.561" />
<PackageVersion Include="Elsa.Studio.Agents" Version="3.3.0-preview.561" />
<PackageVersion Include="FastEndpoints" Version="5.27.0" />
<PackageVersion Include="FastEndpoints.Security" Version="5.27.0" />
<PackageVersion Include="FastEndpoints.Swagger" Version="5.27.0" />
Expand Down Expand Up @@ -95,6 +95,7 @@
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
<PackageVersion Include="System.Linq.Dynamic.Core" Version="1.4.3" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1"/>
<PackageVersion Include="Testcontainers" Version="3.9.0" />
<PackageVersion Include="Testcontainers.RabbitMq" Version="3.9.0" />
<PackageVersion Include="Testcontainers.Redis" Version="3.9.0" />
Expand Down
7 changes: 7 additions & 0 deletions Elsa.sln
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Secrets.Models", "src\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Secrets.Scripting", "src\modules\Elsa.Secrets.Scripting\Elsa.Secrets.Scripting.csproj", "{6C606FEB-9A1F-4816-ABE4-22AFA8CEE771}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.JavaScript.Libraries", "src\modules\Elsa.JavaScript.Libraries\Elsa.JavaScript.Libraries.csproj", "{5F80663C-B072-49DE-9A67-FD804BAD787E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1064,6 +1066,10 @@ Global
{6C606FEB-9A1F-4816-ABE4-22AFA8CEE771}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C606FEB-9A1F-4816-ABE4-22AFA8CEE771}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C606FEB-9A1F-4816-ABE4-22AFA8CEE771}.Release|Any CPU.Build.0 = Release|Any CPU
{5F80663C-B072-49DE-9A67-FD804BAD787E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F80663C-B072-49DE-9A67-FD804BAD787E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F80663C-B072-49DE-9A67-FD804BAD787E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F80663C-B072-49DE-9A67-FD804BAD787E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1250,6 +1256,7 @@ Global
{B3046301-6F00-4885-8B01-080BD489055C} = {50470834-4CD8-479A-8B58-0A1869BA5D37}
{29D12ADC-55E9-40D0-9E4C-F0EBB6E098EC} = {8CEEC194-820A-4C8D-AB9E-E51E6D3E9CC1}
{6C606FEB-9A1F-4816-ABE4-22AFA8CEE771} = {8CEEC194-820A-4C8D-AB9E-E51E6D3E9CC1}
{5F80663C-B072-49DE-9A67-FD804BAD787E} = {6EF07978-A6D2-40EB-891D-7D70C5F37E76}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D4B5CEAA-7D70-4FCB-A68E-B03FBE5E0E5E}
Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ By default, you can access http://localhost:13000 and log in with:
- [Features](#features)
- [Roadmap](#roadmap)
- [Use Cases](#use-cases)
- [Programmatic Workflows](#programmatic-workflows)
- [Designed Workflows](#designed-workflows)
- [Contributing](#contributing)
- [Support](#support)
- [Community Support](#community-support)
- [Enterprise Support](#enterprise-support)

## Documentation

Expand Down Expand Up @@ -174,6 +180,17 @@ Before you start working on your changes or submit a pull request, please open a

This approach helps us streamline contributions and ensures that your efforts are aligned with the project's needs and priorities. We look forward to your contributions and are here to support you throughout the process. Thank you for contributing to the Elsa Workflow project!

---
## Support

Remember to replace any placeholder URLs or instructions with the specific details relevant to the Elsa Workflow project as necessary.
There are various ways to get support for Elsa Workflows, ranging from community-driven channels to enterprise-level services.

### Community Support

Elsa has an active and helpful community where you can find support through multiple channels:
- [GitHub Issues](https://github.com/elsa-workflows/elsa-core/issues) for bug reports and feature requests.
- [GitHub Discussions](https://github.com/elsa-workflows/elsa-core/discussions) for open-ended conversations, questions, and community-driven support.
- [Discord](https://discord.gg/hhChk5H472) for real-time support and interaction with the Elsa community.
- [StackOverflow](https://stackoverflow.com/questions/tagged/elsa-workflows) for searching or asking technical questions.

### Enterprise Support
For organizations requiring professional support and long-term commitment, [ELSA-X](https://elsa-x.io) offers enterprise-level services and ensures continuity and future development of the Elsa framework, provides custom solutions, and develops commercial extensions tailored to enterprise needs.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<ProjectReference Include="..\..\modules\Elsa.Agents.Persistence.EntityFrameworkCore.Sqlite\Elsa.Agents.Persistence.EntityFrameworkCore.Sqlite.csproj" />
<ProjectReference Include="..\..\modules\Elsa.Agents.Persistence.EntityFrameworkCore.SqlServer\Elsa.Agents.Persistence.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\modules\Elsa.EntityFrameworkCore.SqlServer\Elsa.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\modules\Elsa.JavaScript.Libraries\Elsa.JavaScript.Libraries.csproj" />
<ProjectReference Include="..\..\modules\Elsa.Quartz.EntityFrameworkCore.SqlServer\Elsa.Quartz.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\modules\Elsa\Elsa.csproj"/>
<ProjectReference Include="..\..\modules\Elsa.Caching.Distributed.MassTransit\Elsa.Caching.Distributed.MassTransit.csproj" />
Expand Down
21 changes: 15 additions & 6 deletions src/apps/Elsa.ServerAndStudio.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
using Elsa.EntityFrameworkCore.Modules.Runtime;
using Elsa.MassTransit.Options;
using Elsa.Extensions;
using Elsa.JavaScript.Libraries.Extensions;
using Elsa.ServerAndStudio.Web.Extensions;
using Elsa.MassTransit.Extensions;
using Elsa.ServerAndStudio.Web.Enums;
using Jint;
using Jint.Runtime.Modules;
using Medallion.Threading.FileSystem;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Data.Sqlite;
Expand Down Expand Up @@ -79,12 +82,12 @@
runtime.UseEntityFrameworkCore(ef => ef.UseSqlServer(sqlServerConnectionString));
else if (databaseProvider == "Sqlite")
runtime.UseEntityFrameworkCore(ef => ef.UseSqlite(sqliteConnectionString));

if (useMassTransit)
{
runtime.UseMassTransitDispatcher();
}

if (useProtoActor)
{
runtime.UseProtoActor();
Expand All @@ -98,10 +101,16 @@
runtime.WorkflowDispatcherOptions = options => configuration.GetSection("Runtime:WorkflowDispatcher").Bind(options);
})
.UseScheduling()
.UseJavaScript(options => options.AllowClrAccess = true)
.UseJavaScript(javaScriptFeature =>
{
javaScriptFeature
.ConfigureJintOptions(jintOptions => jintOptions.AllowClrAccess = true)
.UseLodashFp()
.UseMoment();
})
.UseLiquid()
.UseCSharp()
// .UsePython()
.UsePython()
.UseHttp(http =>
{
if (useCaching)
Expand Down Expand Up @@ -134,7 +143,7 @@
return new SqliteProvider(new SqliteConnectionStringBuilder(sqliteConnectionString));
});
}

if (useMassTransit)
{
elsa.UseMassTransit(massTransit =>
Expand Down Expand Up @@ -197,4 +206,4 @@
app.UseWorkflows();
app.UseWorkflowsSignalRHubs();
app.MapFallbackToPage("/_Host");
await app.RunAsync();
await app.RunAsync();
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Elsa.Api.Client.Resources.IncidentStrategies.Contracts;
using Elsa.Api.Client.Resources.Scripting.Contracts;
using Elsa.Api.Client.Resources.StorageDrivers.Contracts;
using Elsa.Api.Client.Resources.Tasks.Contracts;
using Elsa.Api.Client.Resources.VariableTypes.Contracts;
using Elsa.Api.Client.Resources.WorkflowActivationStrategies.Contracts;
using Elsa.Api.Client.Resources.WorkflowDefinitions.Contracts;
Expand Down Expand Up @@ -69,6 +70,7 @@ public static IServiceCollection AddDefaultApiClients(this IServiceCollection se
services.AddApi<IJavaScriptApi>(builderOptions);
services.AddApi<IExpressionDescriptorsApi>(builderOptions);
services.AddApi<IWorkflowContextProviderDescriptorsApi>(builderOptions);
services.AddApi<ITasksApi>(builderOptions);
});
}

Expand Down
19 changes: 19 additions & 0 deletions src/clients/Elsa.Api.Client/Resources/Tasks/Contracts/ITasksApi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Elsa.Api.Client.Resources.Tasks.Requests;
using Refit;

namespace Elsa.Api.Client.Resources.Tasks.Contracts;

/// <summary>
/// Represents a client for the tasks API.
/// </summary>
public interface ITasksApi
{
/// <summary>
/// Sends the specified request to the tasks API.
/// </summary>
/// <param name="request">The request.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The response.</returns>
[Post("/tasks/{taskId}/complete")]
Task ReportTaskCompletedAsync([Body] ReportTaskCompletedRequest request, CancellationToken cancellationToken = default);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Elsa.Api.Client.Resources.Tasks.Requests;

/// <summary>
/// Represents a request to report a task has been completed.
/// </summary>
/// <param name="TaskId">The Id of the task being reported as completed.</param>
/// <param name="Result">The result of the task being reported as completed.</param>
public record ReportTaskCompletedRequest(string TaskId, object? Result);
6 changes: 3 additions & 3 deletions src/common/Elsa.Features/Implementations/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private IEnumerable<IFeature> ExcludeFeaturesWithMissingDependencies(IEnumerable
return
from feature in features
let featureType = feature.GetType()
let dependencyOfAttributes = featureType.GetCustomAttributes<DependencyOfAttribute>().ToList()
let dependencyOfAttributes = featureType.GetCustomAttributes<DependencyOfAttribute>(true).ToList()
let missingDependencies = dependencyOfAttributes.Where(x => !_features.ContainsKey(x.Type)).ToList()
where missingDependencies.Count == 0
select feature;
Expand All @@ -158,13 +158,13 @@ private HashSet<Type> GetFeatureTypes()
{
var featureTypes = _features.Keys.ToHashSet();
var featureTypesWithDependencies = featureTypes.Concat(featureTypes.SelectMany(GetDependencyTypes)).ToHashSet();
return featureTypesWithDependencies.TSort(x => x.GetCustomAttributes<DependsOnAttribute>().Select(dependsOn => dependsOn.Type)).ToHashSet();
return featureTypesWithDependencies.TSort(x => x.GetCustomAttributes<DependsOnAttribute>(true).Select(dependsOn => dependsOn.Type)).ToHashSet();
}

// Recursively get dependency types.
private IEnumerable<Type> GetDependencyTypes(Type type)
{
var dependencies = type.GetCustomAttributes<DependsOnAttribute>().Select(dependsOn => dependsOn.Type).ToList();
var dependencies = type.GetCustomAttributes<DependsOnAttribute>(true).Select(dependsOn => dependsOn.Type).ToList();
return dependencies.Concat(dependencies.SelectMany(GetDependencyTypes));
}
}

Large diffs are not rendered by default.

Loading

0 comments on commit 66cc646

Please sign in to comment.