The term 'Unschedule' has been included to the UserDictionary within the Elsa solution settings. This update shows that 'Unschedule' is recognized in the context of the solution, thereby reducing the risk of related typographical errors.
Removed manual removal of child contexts from the list of active activity execution contexts. Replaced it with more efficient direct filtering of not completed activity execution contexts. This change may affect scripts that access activity output directly, but a variable capturing workaround is provided.
Updated the QuartzWorkflowScheduler in Elsa to prevent duplicate job scheduling. Before scheduling a job, the existence of the job is now checked first. This change has been applied to all job types - timestamp, simple schedule, and cron jobs.
The updated code cleans the child contexts of any completed contexts from the list of workflows currently in execution. This change reduces the clutter and potential complications in the context management process. Previously, the unnecessary child contexts were being stored even after the parent context has been completed.
The commit removes unnecessary namespaces in the integration tests for JavaScript Lists and Arrays within the Elsa project. This results in a cleaner codebase, maintaining only the libraries required for the specific tests.
Introduces a safeguard in the JintJavaScriptEvaluator in the Elsa.JavaScript module. This checks whether a workflow execution context can be retrieved before trying to get its input definitions. This prevents potential errors when the context isn't available.
The code has been restructured to account for cases where there is no activity execution context available. Instead of breaking the loop in such cases, the variables are derived from the memory blocks. Also, there is minor code formatting in output handling and array conversion for async enumerables.
The cancellation process in ActivityExecutionContext has been updated to now use DisposeAsync() instead of Dispose(). This implements asynchronous disposal of the cancellation registration. Additionally, a new method supporting cancellation has been added.
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