Commit graph

4717 commits

Author SHA1 Message Date
Marko Lahma 832fac4db1
Add NUKE build support (#4815) 2024-01-21 10:53:07 +01:00
Mohamed Ali 00331f7497
Allow multiple value processing for Form and QueryString values. (#4736)
* Allow multiple value processing for Form and QueryString values.

* refactor HTTPEndpoint

* add multi-part form handling

* cleanup

* reoder form handling code
2024-01-21 10:52:46 +01:00
dependabot[bot] 5edda57c5b
Bump System.Data.SqlClient in /src/modules/Elsa.Dapper (#4805)
Bumps [System.Data.SqlClient](https://github.com/dotnet/corefx) from 4.8.5 to 4.8.6.
- [Release notes](https://github.com/dotnet/corefx/releases)
- [Commits](https://github.com/dotnet/corefx/commits)

---
updated-dependencies:
- dependency-name: System.Data.SqlClient
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-21 10:45:34 +01:00
Sipke Schoorstra 06f994a8d0 Merge branch 'main' of https://github.com/elsa-workflows/elsa-core 2024-01-19 23:27:35 +01:00
Sipke Schoorstra c5e6213fbf Remove Elsa.Studio.Web from solution
A duplicate Elsa.Studio.Web project reference has been removed from the Elsa solution.
2024-01-19 23:27:27 +01:00
Night Wu 4912726ea0
Fix InvalidOperation Exception for SaveVariablesAsync function (#4808)
Co-authored-by: admin <admin@admin.com>
2024-01-19 20:50:30 +01:00
Sipke Schoorstra 39788fb8eb Add Elsa.CSharp project reference and enhance JavaScript usage
The Elsa.Samples.AspNet.MassTransitActivities.csproj file now includes a reference to Elsa.CSharp.csproj. Moreover, the use of JavaScript in the MassTransitActivities sample project has been improved. Clr access granting has been enabled and specific types have been registered to the engine options. Additionally, C# usage is now set, adding required assembly and namespaces.
2024-01-16 21:50:20 +01:00
Sipke Schoorstra c1201484b4 Revert "Use NET 8 SDK artifacts output (#4779)"
This reverts commit 7995b859cc.
2024-01-16 21:04:24 +01:00
Night Wu 310b6fbcd4
Use correct dialect for SqlServerDbConnectionProvider (#4766)
Co-authored-by: admin <admin@admin.com>
2024-01-15 19:45:03 +01:00
Marko Lahma 7995b859cc
Use NET 8 SDK artifacts output (#4779) 2024-01-15 19:43:04 +01:00
leeveney 3d0bfb2bfd
fix EvaluatingCSharp class file name typo (#4783) 2024-01-15 19:39:28 +01:00
Sipke Schoorstra 0c6d5fefb3 Update GitHub Actions workflow to target main branch
The GitHub Actions workflow was previously targeted at the v3.0.2 branch. This
2024-01-08 12:06:24 +01:00
Sipke Schoorstra 3e2a159686 Merge branch 'v3.0.2' into main 2024-01-08 12:05:52 +01:00
Sipke Schoorstra 3e2a8f6295 Update Elsa.Studio packages to version 3.0.2
The package references for Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm have been updated in the specified project files. This ensures that the projects are using the latest version of these packages.
2024-01-08 12:05:31 +01:00
Sipke Schoorstra c601076437 Add workflow serialization and new export endpoint
Implemented a functionality to serialize workflow definitions. This involved modifying the WorkflowSerializer service and the WorkflowDefinitionMapper. Furthermore, a new endpoint (`/export-dynamic-workflow`) for exporting serialized dynamic workflows was created. The changes aim to provide better workflow management and improve application capabilities.
2024-01-07 21:07:14 +01:00
Sipke Schoorstra 704d2207e2 Merge branch 'v3.0.2' into main 2024-01-07 17:16:59 +01:00
Sipke Schoorstra 42db09c689 Update Elsa.Studio packages to version 3.0.1
The Elsa.Studio, Elsa.Studio.Login.BlazorWasm, and Elsa.Studio.Core.BlazorWasm packages have been updated from version 3.0.1-preview.196 to version 3.0.1 in all projects. These updates move the projects from the preview versions to the stable 3.0.1 release.
2024-01-07 17:06:35 +01:00
Sipke Schoorstra 57920fc5c5 Update GitHub workflow to target v3.0.2 branch
The GitHub Actions workflow has been updated to focus on the v3.0.2 branch instead of the main branch. As part of this change, the verification step and VERSION setting have been adjusted to reflect the new branch name.
2024-01-07 16:49:59 +01:00
Sipke Schoorstra a8878e28a7 Merge branch 'v3.0.2' of https://github.com/elsa-workflows/elsa-core into v3.0.2 2024-01-07 16:20:10 +01:00
Sipke Schoorstra c2ec2bda5a Update handling of null outcomes in activity execution
The code was adjusted to correctly handle cases when the method `GetBackgroundOutcomes` returns null. This would cause the activity to complete prematurely.

Fixes #4763
2024-01-07 16:20:02 +01:00
Night Wu ab69e739da
Update FastEndpoints* nuget packages to 5.21.2 version (#4764)
Co-authored-by: admin <admin@admin.com>
2024-01-07 15:56:39 +01:00
Sipke Schoorstra 900aac6d56 Revert "Update FastEndpoints packages to version 5.21.2"
This reverts commit 3b48636ced.
2024-01-07 15:20:56 +01:00
Sipke Schoorstra 8e37ad9bd2 Correct typographical error in workflow name
The previous text had a typographical error in the workflow name in the Elsa Studio GitHub workflow configuration. The updated version has the proper spelling for the Elsa Studio reference application.
2024-01-06 18:22:44 +01:00
Sipke Schoorstra 6c6263622e Update Elsa.Api.Client version and branch reference
Updated the Elsa.Api.Client package version from a preview version to a stable one in the Elsa.Studio.Core project. In addition, adjusted the branch reference in GitHub actions workflow from v3.0.1 to main ensuring the project references the stable Elsa.Api.Client version and that the workflow tracks changes on the main branch, respectively.
2024-01-06 18:21:34 +01:00
Sipke Schoorstra 4fa0d42f83 Update GitHub actions workflow branch reference
The branch reference in the packages.yml workflow file has been updated. We are no longer verifying commits against origin/v3.1.0, and instead verifying them against origin/main. This change aligns with the latest naming convention
2024-01-06 17:51:44 +01:00
Sipke Schoorstra 2fc1701a08 Merge branch 'v3.1.0' into main 2024-01-06 17:49:10 +01:00
Sipke Schoorstra f068b01856 Update workflow to track 'main' branch instead of 'v3.0.1'
This commit updates the Github Actions CI/CD workflow to track changes from the main branch instead of branch v3.0.1. It changes actions in package.yml to fetch, verify commits, and grep in the 'main' branch.
2024-01-06 17:27:31 +01:00
Sipke Schoorstra 71690a2903
Merge 3.0.1 (#4759)
* Update packages.yml for version 3.0.1

The packages.yml workflow file has been updated to target the v3.0.1 branch instead of main. The version also has been updated from 3.0.0 to 3.0.1 in the version prediction logic. Hotfix tags usage has been removed.

* Update git branch for commit verification in workflow

The Github workflow's step for verifying commits' existence has been updated. Instead of searching in the 'origin/main' branch, the workflow now checks in the 'origin/v3.0.1' branch. This modification ensures compatibility and consistency with the version being used.

* Update Elsa.Studio package versions

The Elsa.Studio and Elsa.Studio.Login.BlazorWasm packages in the Elsa.ServerAndStudio.Web and Elsa.Studio.Web projects have been updated from version 3.0.0-preview.177 to the stable version 3.0.0. This is to ensure we're using the stable and reliable versions of these packages in our projects.

* Add background execution to activities and update HTTP requests

Significantly enhanced the capabilities of background execution of activities. Included a change in activity type of "SendHttpRequest" from 'Task' to 'Action'. Introduced new classes for handling outcomes of context in background execution. Made some necessary adjustments to HTTP Request Task to handle sending HTTP requests from a background task. Updated several middleware classes to align with these modifications.

* Add background execution handling to activity context

This commit adds the ability to manage the background execution state directly within the activity execution context. This includes adding methods to set and verify the background execution state, and modifying the existing code to use these new methods. A method for handling activity scheduling during background execution has also been started, but its implementation is not finished yet. The HTTP Request activities were updated accordingly to reflect these changes.

* Add scheduling function for background activities

This commit achieves two main goals. Firstly, it introduces two new classes called ScheduledActivity and ScheduledActivityOptions to store scheduled activities' information. Secondly, it modifies how activities are executed in the background by capturing the scheduling information as a serializable format and storing it in the workflow execution context properties dictionary. This change allows the workflow execution context to resume the activity execution context.

* Refactor HTTP request handling by removing SendHttpRequestTask

SendHttpRequestTask was deleted and its functionality was merged into SendHttpRequestBase. This consolidation led to the addition of StatusCode and ResponseHeaders output fields in SendHttpRequestBase. Another change includes the update in FlowSendHttpRequest to indicate that it's no longer deprecated. Also, HttpHeaders class was extended to accommodate HttpResponseHeaders objects. The consolidation was done to streamline the HTTP request handling process.

* Update GitHub Actions workflow for new release

The GitHub Actions workflow configuration has been updated to target the '3.0.1' branch instead of 'main'. Furthermore, the preview version set in the workflow has been updated to '3.0.1-preview', changing from the previous '3.0.0-preview'.

* Update branch verification in GitHub workflow

The GitHub workflow configuration has been updated to verify that the commit exists in the branch 'origin/3.0.1' instead of 'origin/main'. This is done during the automated package generation process.

* New options to control retry logic for transient failures (#4750)

* Add an option to control the number of automatic retries for transient failures.

* Add SleepDurationProvider option for ElsaClientBuilderOptions

---------

Co-authored-by: admin <admin@admin.com>

* Add IExecuteWorkflowApi interface and refine retry policy configuration

A new interface, IExecuteWorkflowApi, was created to handle execution and dispatch of workflow definitions. This breaks down functionalities previously present in IWorkflowDefinitionsApi. Also, the retry policy configuration for HTTP requests has been refactored. Instead of hardcoding retry settings, now a delegate method can be optionally passed to customize the behavior. This makes it more flexible and shifts the responsibility of configuring retry policies to the client.

* Add option for synchronous broadcast in WorkflowInbox

This update introduces a new option to control synchronicity when broadcasting messages in the WorkflowInbox. The 'BroadcastWorkflowInboxMessageOptions' class allows the developer to specify whether the broadcasting will occur synchronously or asynchronously. The update also includes a new Endpoint and Workflow for demonstration and testing of this functionality.

* Update FastEndpoints packages to version 5.21.2

The current commit updates the version of all FastEndpoints packages from 5.20.1.7-beta to 5.21.2 in the 'Elsa.Api.Common' project. This ensures we are using the most recent stable release of these packages.

#4747

* Add decimal check in PolymorphicObjectConverter

In the PolymorphicObjectConverter class, the check for primitive types and specific object types was updated to include decimal.

Fixes #4714

* Refactor Dapper workflow and update migrations

Modified the store service to optimize the SaveManyAsync method by converting input to list only once. Also, enhanced deletion query in the store service to enable usage of different primary keys. Made changes in the Dapper migrations, replacing "NodeId" with "ActivityNodeId".

* Update workflow to use main branch and version 3.1.0

The workflow has been updated to work with updates on the 'main' branch rather than the 'v3.0.1' branch. Also, the version number for the 'VERSION' variable in preview mode has been updated to 3.1.0 from 3.0.1.

* Remove unnecessary Elsa Server activities

Deleted sample files: DataSourceActivity, MyEndpoint, and MyEventWorkflow from the Elsa Server Web bundle as part of our ongoing codebase optimization strategy. These files were no longer required and their removal simplifies our code structure.

* Update package workflow to reference v3.0.1

The GitHub actions workflow has been updated to pull from branch v3.0.1 instead of main. This change affects the commit verification and version setting steps, now using version 3.0.1-preview in the workflow process.

* Update Elsa.Studio packages to version 3.0.1-preview.196

This commit involves updating the versions of `Elsa.Studio`, `Elsa.Studio.Core.BlazorWasm`, and `Elsa.Studio.Login.BlazorWasm` packages in `Elsa.ServerAndStudio.Web.csproj` and `ElsaStudioWebAssembly.csproj` files to 3.0.1-preview.196. This update will incorporate the new changes and improvements included in this newer version.

* Update Elsa.Studio package versions

The Elsa.Studio and Elsa.Studio.Login.BlazorWasm package versions have been updated in the Elsa.Studio.Web project. Both package versions have been upgraded from 3.0.0 to 3.0.1-preview.196.

* Remove unused Workflow models and simplify AddStorageDriver method

The commit removes BackgroundExecutionOutcome and BackgroundExecutionResult models from Elsa.Workflows.Core, as they are no longer in use. Additionally, it simplifies the AddStorageDriver extension method in ModuleExtensions.cs, now it directly adds the service as an implementation of the IStorageDriver interface.

* Remove unnecessary dependencies in DefaultBackgroundActivityInvoker

Dependencies on IBookmarksPersister and IWorkflowStateExtractor have been removed in the DefaultBackgroundActivityInvoker.cs file. Additionally, an unused `using` statement for Elsa.Workflows.Helpers has been eliminated. This commit aims to declutter the code and increase its maintainability by eliminating unnecessary dependencies.

---------

Co-authored-by: Night Wu <lofrank@outlook.com>
Co-authored-by: admin <admin@admin.com>
2024-01-06 17:26:25 +01:00
Sipke Schoorstra 9e9b122c6e Merge branch 'v3.0.1' into v3.1.0 2024-01-06 17:13:58 +01:00
Sipke Schoorstra 530d6a7a6d Update package workflow to reference v3.0.1
The GitHub actions workflow has been updated to pull from branch v3.0.1 instead of main. This change affects the commit verification and version setting steps, now using version 3.0.1-preview in the workflow process.
2024-01-06 17:10:59 +01:00
Sipke Schoorstra c3741fb268 Remove unnecessary Elsa Server activities
Deleted sample files: DataSourceActivity, MyEndpoint, and MyEventWorkflow from the Elsa Server Web bundle as part of our ongoing codebase optimization strategy. These files were no longer required and their removal simplifies our code structure.
2024-01-06 17:03:14 +01:00
Sipke Schoorstra c135e1ec91 Update workflow to use main branch and version 3.1.0
The workflow has been updated to work with updates on the 'main' branch rather than the 'v3.0.1' branch. Also, the version number for the 'VERSION' variable in preview mode has been updated to 3.1.0 from 3.0.1.
2024-01-06 15:20:38 +01:00
Sipke Schoorstra 6dee8ee26b Refactor Dapper workflow and update migrations
Modified the store service to optimize the SaveManyAsync method by converting input to list only once. Also, enhanced deletion query in the store service to enable usage of different primary keys. Made changes in the Dapper migrations, replacing "NodeId" with "ActivityNodeId".
2024-01-06 15:16:57 +01:00
Sipke Schoorstra 70530aa9fe Add decimal check in PolymorphicObjectConverter
In the PolymorphicObjectConverter class, the check for primitive types and specific object types was updated to include decimal.

Fixes #4714
2024-01-06 14:44:31 +01:00
Sipke Schoorstra 91ac5e816a Merge branch '3.0.1' into v3.0.1 2024-01-06 14:07:21 +01:00
Sipke Schoorstra 3b48636ced Update FastEndpoints packages to version 5.21.2
The current commit updates the version of all FastEndpoints packages from 5.20.1.7-beta to 5.21.2 in the 'Elsa.Api.Common' project. This ensures we are using the most recent stable release of these packages.

#4747
2024-01-06 12:12:52 +01:00
Sipke Schoorstra 652a617a3b Add option for synchronous broadcast in WorkflowInbox
This update introduces a new option to control synchronicity when broadcasting messages in the WorkflowInbox. The 'BroadcastWorkflowInboxMessageOptions' class allows the developer to specify whether the broadcasting will occur synchronously or asynchronously. The update also includes a new Endpoint and Workflow for demonstration and testing of this functionality.
2024-01-06 12:04:51 +01:00
Sipke Schoorstra 53bd1f9df9 Add IExecuteWorkflowApi interface and refine retry policy configuration
A new interface, IExecuteWorkflowApi, was created to handle execution and dispatch of workflow definitions. This breaks down functionalities previously present in IWorkflowDefinitionsApi. Also, the retry policy configuration for HTTP requests has been refactored. Instead of hardcoding retry settings, now a delegate method can be optionally passed to customize the behavior. This makes it more flexible and shifts the responsibility of configuring retry policies to the client.
2024-01-06 11:13:29 +01:00
Night Wu c750686a4b New options to control retry logic for transient failures (#4750)
* Add an option to control the number of automatic retries for transient failures.

* Add SleepDurationProvider option for ElsaClientBuilderOptions

---------

Co-authored-by: admin <admin@admin.com>
2024-01-06 10:43:12 +01:00
Night Wu 99dca9b1ba
New options to control retry logic for transient failures (#4750)
* Add an option to control the number of automatic retries for transient failures.

* Add SleepDurationProvider option for ElsaClientBuilderOptions

---------

Co-authored-by: admin <admin@admin.com>
2024-01-06 10:42:36 +01:00
Sipke Schoorstra dc519afafa Update branch verification in GitHub workflow
The GitHub workflow configuration has been updated to verify that the commit exists in the branch 'origin/3.0.1' instead of 'origin/main'. This is done during the automated package generation process.
2024-01-06 10:36:32 +01:00
Sipke Schoorstra 6baaa2a59f Update GitHub Actions workflow for new release
The GitHub Actions workflow configuration has been updated to target the '3.0.1' branch instead of 'main'. Furthermore, the preview version set in the workflow has been updated to '3.0.1-preview', changing from the previous '3.0.0-preview'.
2024-01-06 10:35:37 +01:00
Sipke Schoorstra 7c632a5b55 Refactor HTTP request handling by removing SendHttpRequestTask
SendHttpRequestTask was deleted and its functionality was merged into SendHttpRequestBase. This consolidation led to the addition of StatusCode and ResponseHeaders output fields in SendHttpRequestBase. Another change includes the update in FlowSendHttpRequest to indicate that it's no longer deprecated. Also, HttpHeaders class was extended to accommodate HttpResponseHeaders objects. The consolidation was done to streamline the HTTP request handling process.
2024-01-06 10:33:44 +01:00
Sipke Schoorstra a950a6de85 Add scheduling function for background activities
This commit achieves two main goals. Firstly, it introduces two new classes called ScheduledActivity and ScheduledActivityOptions to store scheduled activities' information. Secondly, it modifies how activities are executed in the background by capturing the scheduling information as a serializable format and storing it in the workflow execution context properties dictionary. This change allows the workflow execution context to resume the activity execution context.
2024-01-05 22:27:56 +01:00
Sipke Schoorstra 2b6294bcc1 Add background execution handling to activity context
This commit adds the ability to manage the background execution state directly within the activity execution context. This includes adding methods to set and verify the background execution state, and modifying the existing code to use these new methods. A method for handling activity scheduling during background execution has also been started, but its implementation is not finished yet. The HTTP Request activities were updated accordingly to reflect these changes.
2024-01-05 21:45:02 +01:00
Sipke Schoorstra 853355bcbf Add background execution to activities and update HTTP requests
Significantly enhanced the capabilities of background execution of activities. Included a change in activity type of "SendHttpRequest" from 'Task' to 'Action'. Introduced new classes for handling outcomes of context in background execution. Made some necessary adjustments to HTTP Request Task to handle sending HTTP requests from a background task. Updated several middleware classes to align with these modifications.
2024-01-05 21:22:18 +01:00
Sipke Schoorstra 480b726c9d
Refactor service dependencies in BackgroundTaskDispatcher and LocalBackgroundActivityScheduler (#4753)
Removed explicit dependency resolution from the constructors of BackgroundTaskDispatcher and LocalBackgroundActivityScheduler classes, and used IServiceScopeFactory to resolve dependencies inside methods instead. Updated their lifetimes from Scoped to Singleton in the DI container in WorkflowRuntimeFeature. The DI container now manages the lifetime scope of these services, promoting better separation of responsibilities and improved testability.
2024-01-05 12:13:44 +01:00
Sipke Schoorstra 91b59a90ef Remove unused namespaces and pipelines project
This commit removes System.Net and Elsa.Http import statements from the DynamicWorkflows endpoint as they were not being used. Additionally, this includes removal of the unnecessary "pipelines" project from Elsa.sln file as the referred workflow files were no longer needed in the solution.
2024-01-04 22:10:12 +01:00
Sipke Schoorstra fa21cba51f Add workflow registry
This commit introduces a workflow registry for dynamically creating and registering workflows. It also includes a typed workflow materializer and extends existing services to support the new functionality. Changes are made across multiple files to integrate these new components and enhance the overall workflow functionalities.
2024-01-04 22:07:55 +01:00
Sipke Schoorstra 7f1b5be9b9 Update Elsa.Studio package versions
The Elsa.Studio and Elsa.Studio.Login.BlazorWasm packages in the Elsa.ServerAndStudio.Web and Elsa.Studio.Web projects have been updated from version 3.0.0-preview.177 to the stable version 3.0.0. This is to ensure we're using the stable and reliable versions of these packages in our projects.
2024-01-04 20:35:05 +01:00