Commit graph

4612 commits

Author SHA1 Message Date
Sipke Schoorstra 2f10ef9cf5 Update localhost port for workflow sample
The localhost port for the Elsa.Samples.AspNet.RunTaskIntegration has been updated from 7211 to 5001 in both the run-workflow.http and launchSettings.json files. This adjustment ensures that the workflow sample correctly points to the new localhost port, maintaining synchronization within the application.
2023-12-25 22:23:31 +01:00
Sipke Schoorstra 46ba0d9829 Refactor task payload extraction and update workflow builder
Modified the way task payload is extracted in the OrderFoodTaskHandler.cs for more robustness. The input parameter of the workflow builder in the HungryWorkflow.cs file has also been refactored for efficiency. Making these tweaks streamlines management of values within the tasks.
2023-12-25 22:23:23 +01:00
Sipke Schoorstra 2c0c880a9a Implement pagination for activity descriptor fetching
Updated the WorkflowDefinitionActivityProvider code to fetch activity descriptors in a paginated manner. This change will be useful to avoid overloading system resources when interacting with large amounts of data. It retrieves a limited number of descriptors per request, looping until all are fetched.

Closes #4689
2023-12-25 22:00:25 +01:00
Sipke Schoorstra 6a5835e51a Update artwork 2023-12-25 12:27:07 +01:00
Sipke Schoorstra c91338d8bd Update Elsa.Studio.Login.BlazorWasm version
The version number of Elsa.Studio.Login.BlazorWasm has been updated in the Elsa.AllInOne.Web.csproj file. This change reflects the newest release, moving from version 3.0.0-preview.164 to 3.0.0-preview.167.
2023-12-18 22:13:27 +01:00
Sipke Schoorstra 20cf5ade2d Remove specific activity instance bookmarks
The change clears specific activity instance bookmarks in the context from the WorkflowExecutionContext. This is an extra step in the process of clearing bookmarks, which assists in managing and cleaning up workflow state effectively.
2023-12-18 21:39:30 +01:00
Sipke Schoorstra 76bf3f8e30 Refactor code structure for ServiceBus Integration tests
Refactored the ServiceBus Integration tests for improved readability and maintenance. The changes included reducing the number of lines by removing unnecessary curly braces, removing unnecessary use of 'this' qualifier, replacing null checks with null-conditional operators, and organizing various code blocks for better understanding.
2023-12-18 20:20:39 +01:00
Sipke Schoorstra 5e95daaa7c Refactor code for readability and improved logging
Code in several activity files and Worker.cs that involve creating bookmarks and handling messages received was refactored to improve readability and clarity. The instantiated "CreateBookmarkArgs" parameter was split into its individual arguments for improved readability. Logging in the Worker.cs file was also fine-tuned, with explicit count of workflows triggered by service bus messages being included in the debug log.
2023-12-18 20:20:20 +01:00
Sipke Schoorstra 32e9cbfaa5 Refactor object initialization in ActivityExecutionContext
Refactoring was performed in the ActivityExecutionContext class to use object initializers for readability and clarity. This modification mainly targets the CreateBookmark and ScheduleActivityAsync methods, making their code more explicit and thus easier to understand.
2023-12-18 20:19:51 +01:00
Sipke Schoorstra 49ba29da8d Add AutoComplete option to workflow bookmarks
The AutoComplete option has been added to the workflow bookmarks, which determines whether the activity should automatically be completed if no callback is specified. This change improves the flexibility of bookmark creation and impacts various workflow elements and procedures. The corresponding adjustments have been made at functions where bookmarks are used or created.
2023-12-18 20:19:37 +01:00
Sipke Schoorstra a9ccd4fac8 Add 'Noop' method to WorkflowExecutionContext
A Noop method has been added to the WorkflowExecutionContext, and is now assigned to the ExecuteDelegate field when no resumption point is specified. The change, will prevent the invocation of the regular "ExecuteAsync" method, closing the activity without additional operations.
2023-12-18 16:12:25 +01:00
Sipke Schoorstra 8ceb76ddbe Add conversion support for long type in ObjectConverter
The ObjectConverter file has been updated to support conversion of 'long' type. This is done by adding an additional conditional statement for checking the underlying source type for 'long', then returning the converted value.
2023-12-18 16:12:01 +01:00
Sipke Schoorstra 3aedf27727 Update workflow handling and simplify codebase
Refactored the workflow handling logic and simplified numerous components in the codebase. Major changes include the enhancement of the Workflow Runtime handler, altering the broadcast and deliver functions in the Default Workflow Inbox, and the removal of unnecessary details in the Workflow Runtime feature. Also, unnecessary services and requests were removed for better code efficiency and readability.
2023-12-18 16:11:48 +01:00
Sipke Schoorstra cc24c5c759 Add bookmarks processing to DefaultBackgroundActivityInvoker
The code addition includes two dependencies, IBookmarksPersister and IWorkflowStateExtractor, in the DefaultBackgroundActivityInvoker service. With these changes, during the workflow execution phase, bookmarks are captured and processed for any state changes. These modifications provide more control and efficiency over handling workflow states during the system's background operations.
2023-12-18 16:05:51 +01:00
Sipke Schoorstra f575d38dcc Add Bookmark Persister and Bookmark Updater
The code introduces BookmarkPersister for processing bookmarks as part of the workflow runtime. This refactoring improves readability and maintainability by separating the bookmark persisting logic from the PersistBookmarkMiddleware class. A new class, BookmarkUpdater, is also added to handle updating of bookmarks. Changes also include adjustments to several other classes for improved functionality and code consistency.
2023-12-18 16:05:12 +01:00
Sipke Schoorstra ae821b4494 Add 'Persister' to UserDictionary in DotSettings
The new dictionary entry for 'Persister' has been added to Elsa.sln.DotSettings. This expands the vocabulary of the solution's user dictionary and ensures that 'Persister' is recognized as a valid term within the project context.
2023-12-18 16:04:33 +01:00
Sipke Schoorstra b5d38b6604 Add methods to handle activity run asynchronously flag
New methods have been added to handle the custom property 'runAsynchronously' on a JsonObject activity. These methods will help in getting and setting a value that indicates whether a specified activity can trigger a workflow asynchronously. This additional level of control can enhance workflow execution based on specific requirements.
2023-12-18 16:04:21 +01:00
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