The JavaScript list and array test cases code has been restructured and moved into JavaScriptListsAndArrays directory. As a consequence, the previous Tests.cs file has been deleted. Additional test cases have been added to cover more scenarios, such as handling magic numbers in the code.
A new ObjectArrayHelper class has been added into the Elsa.JavaScript module to improve array detection. The previous IsArrayLike method used in JintJavaScriptEvaluator and integration tests has been replaced by the DetermineIfObjectIsArrayLikeClrCollection method from this helper. These changes also provoked an update of the Jint package version from 3.0.0-beta-2057 to 3.0.0.
A new unit test class is added in the IntegrationTests project. The class, located in the JavaScriptListAndArray directory, focuses on testing the engine's ability to handle JavaScript list and array-like objects.
The StringObjectDictionaryConverter class was removed as it is no longer necessary. Instead, the JintJavaScriptEvaluator now wraps objects in ObjectWrapper instances and sets their prototype to Array.prototype if they are array-like. This allows for more convenient and intuitive use of Lists and arrays in JavaScript code within Elsa. A new integration test was created to validate this functionality.
The GitHub Actions workflow has been updated to focus on version 3.0.5 for both commit verification and version naming. The actions will now fetch, verify, and build with the new target version, ensuring our continuous integration remains aligned with the newest release.
A StringObjectDictionaryConverter has been added, which converts all IList fields of an object to array fields. This enhances the interaction of JS expressions with list types, allowing common Array methods to be applied directly. Furthermore, defaults have been added to the ExpressionEvaluatorOptions parameters to improve usability. Lastly, adjustments were made to ensure variables are correctly set while evaluating expressions.
Two inputs in DispatchWorkflow.cs, "Workflow Definition" and "Correlation ID", now have additionally defined DisplayName properties. This will enhance understanding and user experience by displaying clearer input field names within the application.
The commit changes the 'ForEach' activity to 'ParallelForEach' in the 'OrderBatchProcessor.cs' file. This adjustment seeks to iterate through orders in parallel rather than sequentially, aiming to improve efficiency and performance. The 'ItemSource' property was also renamed to 'Items' to align with the new activity.
The version of the System.ComponentModel.Annotations package was downgraded from 6.0.0-preview.4.21253.7 to 5.0.0 in the Elsa.Workflows.Core project. This could be due to compatibility issues or to match the version used in other components of the project.
Removed the ItemSource property and related logic in ForEachT.cs. Instead of considering two sources (Items and ItemSource) for iterations, the code now only iterates over the Items collection. Additional logic has been added to initialize Items to an empty collection when it is not set.
This update adds new keys to the default background activity invoker for task completion and bookmarks. It also modifies handling of dispatched workflow instances in BulkDispatchWorkflows activity. It further updates the BackgroundActivityInvokerMiddleware to capture and remove additional task details from the workflow execution context. Refactors are made to ObjectConverter and a set method for background completion is added to ActivityExecutionContextExtensions and BackgroundActivityExecutionContextExtensions.
Modified code formatting to enhance readability in several files including integration tests and workflow definitions. Order of project references in both Elsa.sln and Elsa.Server.Web.csproj files were rearranged. Unnecessary namespaces were also removed in BulkSuspendedWorkflow.cs and _build.csproj file saw a minor adjustment.
Expanded the GetWorkflowDefinitionId method in ActivityExtensions.cs to check for multiple properties before determining whether an activity is a workflow definition activity or not. This ensures a more rigorous validation process.
The hardcoded version specification has been removed from the Elsa.Workflows.Api project file. This change will allow the versioning system to more effectively manage and track the versioning of the project.
The target branches for GitHub Action on pull requests have been updated. Specifically, the wildcard 'v3*' is removed from the 'OnPullRequestBranches' attribute. Now, actions will only be triggered for pull requests on the 'main' branch.
The namespace in the ModuleExtensions.cs file within Elsa.Webhooks has been changed. The change moves the namespace from "Elsa.Webhooks.Extensions" to "Elsa.Extensions". A ReSharper directive has been added to disable warnings related to the namespace check.
The package versions for Elsa.Studio and Elsa.Studio.Login.BlazorWasm have been updated to 3.0.4 across multiple projects. This update allows projects to utilize the latest features and improvements from these packages.
The version number has been updated in the GitHub actions workflow file. Previously, it was hardcoded to "3.0.3-preview", but now it's switched to "3.0.4-preview". This change keeps our software versioning consistent and up-to-date.
The GitHub actions workflow has been updated to target the version branch v3.0.4. The necessary checks and commands have been modified accordingly to ensure proper compatibility with the new branch. This update is necessary for the correct functioning of the automatic deployment activities.
The private methods within the WorkflowStateExtractor service have been reordered for readability and maintainability. The `ApplyInput` and `GetPersistableInput` methods have been moved to a position just before the `ExtractProperties` method. This ensures that similar or related methods are grouped together, improving the logical structure of the code.
A new method ApplyInput has been added to prevent overwriting any existing input in the WorkflowExecutionContext. Now, input items are added to the workflow execution context only if they don't exist there already. The Apply method has been updated as well to add workflow state inputs appropriately.
Fixes#4705
* Removed duplicate entries
* Prevented workflows and activities from starting when the parent workflow is being cancelled
* Added cancellation to execution contexts
* Added store for workflow execution contexts
* Added cancellation to workflowRuntime
* Removed calling BookmarkPersistedHandler when persisting bookmarks.
* Added endpoint for bulk cancelling tasks
* Added tests for cancelling workflows
* Prevented cancelling the cancellation process since it could have unwanted effects
---------
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Allow multiple value processing for Form and QueryString values.
* refactor HTTPEndpoint
* add multi-part form handling
* cleanup
* reoder form handling code
The version of Elsa.Studio and Elsa.Studio.Login.BlazorWasm in the Elsa.ServerAndStudio.Web project has been upgraded from 3.0.2 to 3.0.3. This update aims to incorporate the latest features and bug fixes from these packages.
This update includes adding an optional input parameter to the ScheduleChildActivity signal's constructor in order to pass options to the child activity. The input parameter is used while scheduling activities in FlowFork.cs and Flowchart.cs activities. This enables clearer data transfer and scheduling in the system.
A new BatchProcessing sample project has been added demonstrating how to process items in batches. ForEach and ParallelForEach activities were updated to allow using an IAsyncEnumerable as source. BulkDispatchWorkflows was also refactored to improve its efficiency and handling.
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.