Commit graph

4595 commits

Author SHA1 Message Date
Sipke Schoorstra 6db3cc99b5 Update BulkDispatchWorkflows activity
The BulkDispatchWorkflows.cs activity in Elsa.Workflows.Runtime module has been updated with some key changes: Added detailed description to the input element, introduced the dispatchedInstancesCount to accurately track the number of instances dispatched, and removed some unnecessary white spaces for improved readability.
2023-12-17 21:45:43 +01:00
Sipke Schoorstra 916256e9f6 Change ActivityKind from Job to Task in BulkDispatchWorkflows
The ActivityKind property in BulkDispatchWorkflows class has been changed from Job to Task. This updates the type of activity associated with the BulkDispatchWorkflows process within the Elsa workflow runtime module.
2023-12-17 21:26:58 +01:00
Sipke Schoorstra fc878a4b30 Refactor background activities scheduling
Background activities scheduling was moved to its own middleware where the actual scheduling happens instead of in the invoking middleware. Removed ScheduleBackgroundActivities.cs handler and added ScheduleBackgroundActivitiesMiddleware.cs instead. As a part of this change, restructured BackgroundActivityInvokerMiddleware to BackgroundActivityCollectorMiddleware, and updated all relevant references.

Minor modifications to a few other files include changes in their package dependencies and activity kind settings.
2023-12-17 21:19:15 +01:00
Sipke Schoorstra 19522e467f Refactor workflow methods for async execution
Modified methods in the WorkflowInstance.cs to implement re-entrant approach for asynchronous execution. This is achieved by replacing 'await' with task-based calls passed through the Context.ReenterAfter method, providing more efficient non-blocking operations. Minor changes were also made in ClusterExtensions.cs and ProtoActorWorkflowRuntime.cs, including code clean up and slight modifications to maintain consistency.
2023-12-16 21:25:40 +01:00
Sipke Schoorstra 6b1f29d451 Merge branch 'main' of https://github.com/elsa-workflows/elsa-core 2023-12-16 11:47:12 +01:00
Sipke Schoorstra 65cb2640e3 Implement batch processing in BulkDispatchWorkflows
The changes introduce a batch processing mechanism in the BulkDispatchWorkflows activity. Previously, each workflow was dispatched individually. Now, the process groups the workflows in batches, processes each batch concurrently, and handles errors. This change improves performance, particularly for large data sources.
2023-12-16 11:45:31 +01:00
Sipke Schoorstra 1204ac0319 Remove Console and ASP.NET examples, simplify README.md
Simplified README.md by removing in-depth Console and ASP.NET Core examples, as well as mentions about building from source, serving overall clarity and readability. Added descriptions for coded and visual workflow design possibilities.
2023-12-16 11:44:41 +01:00
Mohamed Ali 4a8269efdf [no ci] add link to Elsa 2 in README 2023-12-14 14:21:39 +03:00
zergmk2 3ca9b29ad6
Update README to add access information when user tried to run elsa with docker (#4708) 2023-12-14 11:35:48 +01:00
Sipke Schoorstra 6a36cbd6a3 Add ExpressionEvaluatorOptions to JavaScriptEvaluator
The JavaScriptEvaluator now accepts an options parameter of type ExpressionEvaluatorOptions. This allows adding custom arguments to the evaluation context. An 'Empty' static instance of ExpressionEvaluatorOptions is added for convenience. Additionally, the usage of MassTransitAzureServiceBus in Program.cs is turned off by setting the flag to 'false'.
2023-12-14 10:45:37 +01:00
Sipke Schoorstra 8b293884ab Add tests for implicit joins and fix duplicate activity scheduling
This commit includes new integration tests for implicit join scenarios. The tests ensure that join and parallel join activities execute correctly and complete as expected. Additionally, a change has been made to the workflow execution context to prevent duplicate activity scheduling. Now, aside from checking if the activity is already scheduled, it also checks if the activity is scheduled for the specified owner.

Fixes #4703
2023-12-13 23:38:41 +01:00
Sipke Schoorstra 318d956db6 Update description in README.md
The current diff modifies the description of the Docker image in the README file. The revised description consolidates information about the image, its reference ASP.NET application nature, and its non-production intention into a single, more succinct sentence.
2023-12-13 21:43:03 +01:00
Sipke Schoorstra eeba1f8e9b Reorganize README and add Docker instructions
The README file was reorganized to make it more readable by grouping related badges together. Additionally, instructions on how to start the Elsa Docker container were appended for users who want to quickly try out the Elsa Studio and Elsa Server.
2023-12-13 10:04:12 +01:00
Sipke Schoorstra e8e1ec7092 Update Elsa.Studio package versions
The package references for Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm in Elsa.AllInOne.Web and ElsaStudioWebAssembly projects were updated. The version has been changed from 3.0.0-preview.160 to 3.0.0-preview.164 to incorporate the latest features and bug fixes.
2023-12-13 09:41:03 +01:00
Sipke Schoorstra 41b907ae7f Renamed AI file 2023-12-13 09:26:29 +01:00
Sipke Schoorstra 5d9e886e7f Enhance configuration options for MassTransit
This commit enhances the configuration options for the MassTransit integration, providing additional settings for both Azure Service Bus and RabbitMq. It also refines the MassTransit workflow dispatcher configuration by allowing for custom dispatcher options. A default RabbitMq connection string has been added to the appsettings.json.
2023-12-11 20:49:59 +01:00
Sipke Schoorstra 065765307b Refactor MassTransit & AzureServiceBus configuration and delete unnecessary options
AzureServiceBusOption.cs and RabbitMqOptions.cs files were removed as they're no longer needed. The system now defers the configuration of MassTransit and AzureServiceBus to the application layer (Program.cs). The configuration for PrefetchCount is also allowed at the transport-level. A new abstraction, ConsumerTypeDefinition, collects all the consumer types with their respective definitions if provided. Adjustments have been made in related extension methods and classes to reflect these changes.
2023-12-11 19:59:13 +01:00
Sipke Schoorstra e9f1aade15 Add IsWorkflowDefinitionActivity method to ActivityExtensions
A new method, GetIsWorkflowDefinitionActivity, has been added to the ActivityExtensions class. This method checks a given JsonObject representing an activity to determine if it's a workflow definition activity. It returns true if the activity indeed is; otherwise, it returns false.
2023-12-11 12:44:19 +01:00
Sipke Schoorstra 49e96d53b3 Update README with enhanced instructions for Elsa server and studio
The README updates include specific instructions for running the Elsa server on port 5001 and the Elsa studio application on port 6001. These enhanced guidelines provide comprehensive steps for configuring the applications regarding authentication, module usage, and use of API endpoints.
2023-12-11 11:01:55 +01:00
Sipke Schoorstra 8bf05c73a3 Add badges to README.md
The README.md file has been updated to include badges for packages, continuous delivery, and discussions related to Elsa workflows. These badges provide quick access to key information and resources like Nuget, npm, GitHub Actions, feedz.io, Docker, Discord, Stack Overflow, and subreddit subscribers.
2023-12-11 00:10:45 +01:00
Sipke Schoorstra 84ea6d8754 Remove obsolete files from designer packages
Numerous unused and obsolete files have been removed from various designer packages including angular-workspace, elsa-workflows-designer, react-workspace, and others. This cleanup enhances the maintainability of the project by eliminating unnecessary files and reducing clutter.
2023-12-10 23:49:12 +01:00
Sipke Schoorstra 006db97a66 Remove npm-packages workflow, adjust branch triggers in workflows
The npm-packages.yml workflow has been removed. The branch triggers in the workflows npm-packages.yml, packages.yml, and all-in-one-web.yml have been changed from 'v3' to 'main'. An unnecessary reference to the deleted workflow file npm-packages.yml is also removed from Elsa.sln.
2023-12-10 23:47:45 +01:00
Sipke Schoorstra 6b25231218 Update title in README.md
The README.md file has been updated to reflect the new version of Elsa - Elsa 3.0.
2023-12-10 23:43:52 +01:00
Sipke Schoorstra daea741320 Add new visuals and update descriptions in README
The visuals and their respective descriptions on the README page have been updated. A new image has been added at the top of the document, and one existing image and its caption are updated to better describe the content.
2023-12-10 22:59:13 +01:00
Sipke Schoorstra 2dee2039ac Add "Building from Source" section in README.md
In this update, a "Building from Source" section was added to the README.md file. This section provides instructions on how to build and test the current project using the .NET 6 SDK or later. It also includes steps to run the Elsa.AllInOne.Web project.
2023-12-10 22:33:31 +01:00
Sipke Schoorstra c3a3e5be87 Update README with scheduling instructions
Added detailed instructions in the README file on how to update the Program.cs file with the UseScheduling() method. Also made modifications to the HeartbeatWorkflow class to use the Elsa.Scheduling.Activities.Timer.
2023-12-10 22:28:24 +01:00
Sipke Schoorstra 3aeacfeebb Update README with detailed usage instructions and examples
This commit improves the README by providing in-depth instructions on how to run the application and examples of more complex workflows. In addition, it includes details on creating an ASP.NET Core application to act as a workflow server and demonstrates how to handle HTTP requests using workflows.
2023-12-10 22:13:00 +01:00
Sipke Schoorstra c8db745658 Remove unnecessary project reference in Elsa.Scheduling
Removed the project reference to Elsa.Elasticsearch in Elsa.Scheduling.csproj. This reference is no longer in use and removing it simplifies the project dependencies.
2023-12-10 22:11:01 +01:00
Sipke Schoorstra 6ff6cc6826 Refactor expression descriptors and remove unnecessary async calls
This commit refactors how expression descriptors are created and retrieved across Elsa project. The asynchronous methods have been simplified to synchronous ones removing unnecessary `ValueTask` returns. Additionally, `IExpressionDescriptorRegistryPopulator` has been removed resulting in less complexity and better performance.
2023-12-10 21:43:24 +01:00
Sipke Schoorstra 3d68207547 Update description of Capsules in README
The short description of Capsules under the feature list has been updated for clarity. The updated description more accurately reflects that Capsules are "hot" deployable workflow packages that contain activities and configuration.
2023-12-10 21:24:39 +01:00
Sipke Schoorstra b26e39abed Move Elsa logo in README
The Elsa logo image has been moved in the README for better visualization. This small reordering aims to improve overall project documentation readability and presentation.
2023-12-10 12:30:06 +01:00
Sipke Schoorstra ab4d2992d2 Move logo image in README.md
The logo image in the README file has been moved to a more suitable location. This adjustment enhances the overall structure and readability of the document.
2023-12-10 12:29:26 +01:00
Sipke Schoorstra 5128454217 Refactor README.md for improved readability and clarity
This update applies significant changes to the README.md file. A major restructuring of the content was done to improve the overall readability and understandability of the file. This includes modifications to several sections, like the introduction, documentation, features, known limitations, and more, along with adding a table of contents. The examples were also refined to make them clearer and more digestible.
2023-12-10 12:27:39 +01:00
Sipke Schoorstra 18a717c83a Update README 2023-12-10 12:15:11 +01:00
Sipke Schoorstra fcae64c935 Add sample project 2023-12-10 12:15:03 +01:00
Sipke Schoorstra 8bb7d81251 Update Elsa.Studio packages and configure authentication handler
The Elsa.Studio, Elsa.Studio.Core, and Elsa.Studio.Login packages have been updated across the projects Elsa.AllInOne.Web and ElsaStudioWebAssembly, from Ver. 3.0.0-preview.148 to Ver. 3.0.0-preview.160. In the Program.cs of ElsaStudioWebAssembly, the authentication mechanism has been adjusted by specifying an AuthenticatingApiHttpMessageHandler for the HttpMessageHandler in the method AddRemoteBackend().
2023-12-09 22:10:16 +01:00
Sipke Schoorstra 441b12e90d Remove PR body generator workflow
The PR body generator workflow has been removed from the repository. This includes the deletion of the workflow configuration file (pr-body-generator.yml) under the GitHub Actions workflows directory and the removal of reference to it in the Elsa.sln file.
2023-12-09 21:28:32 +01:00
Sipke Schoorstra c97282f7d5 Remove ApiHttpMessageHandler and update ElsaClient configuration
The ApiHttpMessageHandler and the related configuration in ElsaClientOptions have been removed. The configuration for creating Api clients in DependencyInjectionExtensions has been updated to handle these changes. This includes the addition of a retry policy in case of transient HTTP error and changing the way clients are created to use the HttpClientFactory directly.
2023-12-09 20:44:11 +01:00
Sipke Schoorstra cc18e99d24 Refactor HTTP headers in Elsa
Removed HttpResponseHeaders class and refactored HttpRequestHeaders class into HttpHeaders. This commit merges the separate classes to represent HTTP headers into a single class, HttpHeaders. It also includes updates to the related files like HttpJavaScriptHandler and SendHttpRequestBase to reflect these changes.
2023-12-08 21:53:43 +01:00
Sipke Schoorstra faf8fd1df6
Enhanced ObjectConverter to Return JsonObject Instead of JsonElement (#4686)
* Incremental work

* Refactor code for JSON object handling and workflow context

This commit includes a significant rework of JSON object handling by ensuring produced JsonObject remains as JsonObject. Previously unimplemented customer and order workflow context providers have been removed. The test cases have been renamed and updated to confirm the new behavior is working as expected.
2023-12-08 20:57:07 +01:00
Sipke Schoorstra e03439515f Enable conditional MassTransit usage in Elsa.WorkflowServer
An if condition has been introduced to control the usage of MassTransit in the Elsa.WorkflowServer.Web.
2023-12-08 09:07:57 +01:00
MariusVuscanNx 2dc584fac7
Implemeted FlowFork activity (#4684) 2023-12-07 22:29:05 +01:00
Sipke Schoorstra 683f0ee6d8
Add Bulk Dispatch Workflow activity (#4683)
* Initial version of BulkDispatchWorkflow

* Update comments

* Refactor options models for running workflows and add Properties

* Fix resumption

* Add ability to provide arguments when evaluating expressions

* Update args syntax for JS

* Fix ProtoActor Runtime Properties mapping

* Use default constructor

* Provide completed workflow instance ID as input to BulkDispatchWorkflows

* Implement ChildFaulted port

* Switch to Publish to make Memory service bus work

* Update input evaluation and activity output retrieval

Refined the input evaluation process to only consider inputs with AutoEvaluate set to true. Added a comment to clarify the purpose of the GetActivitiesWithOutputs method. Removed the unnecessary check for AutoEvaluate from the EvaluateInputPropertyAsync method.
2023-12-06 22:32:08 +01:00
Sipke Schoorstra 0146a8aeb0 Update AllInOne dockerfile 2023-12-04 14:25:34 +01:00
Sipke Schoorstra 50ac0e9371 Exclude Start field from being serialized 2023-11-30 12:14:01 +01:00
Sipke Schoorstra 1ed98dfb57 Cleanup 2023-11-30 12:06:41 +01:00
Sipke Schoorstra 811ab7702d Fix conversion of dynamic values to T 2023-11-29 20:30:38 +01:00
Sipke Schoorstra 213f114cfc Add support for JsonObject to target type conversion 2023-11-29 15:09:00 +01:00
Sipke Schoorstra 3352cbee40 Update tests 2023-11-28 22:51:23 +01:00
Sipke Schoorstra d25dbe552e Fix .NET targeting in ElsaAPI client 2023-11-28 22:45:07 +01:00