The logging scope that was created within the OnChildCompletedAsync method in the Flowchart.cs file has been removed. Additionally, some trivial code formatting adjustments were made to increase readability and maintain consistency. No significant functionality changes were introduced.
This commit changes the reference to the logger instance in the DefaultTriggerScheduler class. It corrects the reference from a private instance to the correct instance 'logger'. Moreover, the string formatting of the second logger warning message has been updated for standardization.
This update prevents the creation of multiple flow activities by checking if the activity is already set to be created while the activity context has not yet been created.
The logger scope state within the Flowchart activity has been updated to use the current managed thread ID from the Environment class. Additionally, a new property 'TaskId' has been incorporated for providing the current task ID, defaulting to 'N/A' in case null.
Added a check and corresponding log warning in the 'DefaultWorkflowDefinitionStorePopulator' class for cases where an imported workflow definition has a different ID than the existing one in the store. This will help in identifying ID discrepancies that may impact workflow execution or management. Future updates may include storing these discrepancies for troubleshooting purposes.
Added a check and corresponding log warning in the 'DefaultWorkflowDefinitionStorePopulator' class for cases where an imported workflow definition has a different ID than the existing one in the store. This will help in identifying ID discrepancies that may impact workflow execution or management. Future updates may include storing these discrepancies for troubleshooting purposes.
* Add logging to the WorkflowRunner service
The WorkflowRunner service now uses the Microsoft.Extensions.Logging namespace to log the workflow execution context. These changes include passing the ILogger<WorkflowRunner> logger dependency through the constructor and implementing the context logging functionality in the RunAsync method.
* Update error handling in FindActivityDescriptor method
FindActivityDescriptor method's error handling has been updated. Now, instead of throwing exception, it returns null when an activity descriptor can't be found. Also, a logger warning has been added to indicate when this situation occurs. This change helps avoiding unexpected disruptions and improving debugging experiences.
* Add ReSharper properties to .editorconfig
This commit introduces specific ReSharper properties to the .editorconfig file. This update will maintain a consistent configuration of ReSharper across different development environments, intending to improve coding standard consistency.
* Add thread and activity ID to Flowchart logging scope
The Flowchart activity in Elsa Workflows Core module has been modified to include thread and activity ID in its logging scope. This change will provide more granular information when debugging workflow execution. Additionally, the definition for outcomeNames has been streamlined.
* Add ActivityInstanceId to logger scope
Added "ActivityInstanceId" as part of the logging scope dictionary in the Flowchart module. The new key records the context's target context's id for improved debugging capabilities.
* Remove signal capturing functionality from workflow activities
Removed the functionality related to signal capturing from the Elsa workflow activities. This refactor involves changes in core classes such as Activity, Behavior, and Flowchart and removes associated methods and handlers. This simplifies the signal handling process by only allowing activities to receive signals, eliminating the previous two-step process of capturing and receiving.
* Update debugging messages in Flowchart.cs
Clarified the debugging message when there's an existing join context. Removed unnecessary logging for "No pending work found", "No faulted activities found", and "Completing flowchart". This will make the debugging log less cluttered and more focused on relevant information.
* Refactor logging messages in Flowchart activity
The commit removes the verbose logging message indicating the completion of a terminal activity in the flowchart Context. This logging message was unnecessary and was generating excessive log messages. The log message for new join activities was also updated to accurately reflect the creation of a new join context.
* Disable SonarCloud analysis from workflow
The SonarCloud analysis steps, including scan setup, run and end steps have been commented out in the GitHub workflow. This is a temporary change to speed up build times while troubleshooting an issue.
* Uncommented SonarCloud analysis related code in packages.yml
In this commit, the parts of the code related to the set up of JDK 17, SonarScanner for .NET, Coverlet for code coverage, and SonarCloud analysis were uncommented in the GitHub Actions workflow packages.yml file. This will enable those tools and services during the execution of the workflow, improving code quality and test coverage.
* Change position of root assignment comment in .editorconfig
* Format method signatures in WorkflowRunner
Changed the method signatures in the WorkflowRunner class to be in a single line for readability and to follow coding standards. The refactor involves three RunAsync method overloads, contributing to the overall cleanliness and readability of the source code.
* Add logging to the WorkflowRunner service
The WorkflowRunner service now uses the Microsoft.Extensions.Logging namespace to log the workflow execution context. These changes include passing the ILogger<WorkflowRunner> logger dependency through the constructor and implementing the context logging functionality in the RunAsync method.
* Update error handling in FindActivityDescriptor method
FindActivityDescriptor method's error handling has been updated. Now, instead of throwing exception, it returns null when an activity descriptor can't be found. Also, a logger warning has been added to indicate when this situation occurs. This change helps avoiding unexpected disruptions and improving debugging experiences.
* Add ReSharper properties to .editorconfig
This commit introduces specific ReSharper properties to the .editorconfig file. This update will maintain a consistent configuration of ReSharper across different development environments, intending to improve coding standard consistency.
* Add thread and activity ID to Flowchart logging scope
The Flowchart activity in Elsa Workflows Core module has been modified to include thread and activity ID in its logging scope. This change will provide more granular information when debugging workflow execution. Additionally, the definition for outcomeNames has been streamlined.
* Add ActivityInstanceId to logger scope
Added "ActivityInstanceId" as part of the logging scope dictionary in the Flowchart module. The new key records the context's target context's id for improved debugging capabilities.
* Remove signal capturing functionality from workflow activities
Removed the functionality related to signal capturing from the Elsa workflow activities. This refactor involves changes in core classes such as Activity, Behavior, and Flowchart and removes associated methods and handlers. This simplifies the signal handling process by only allowing activities to receive signals, eliminating the previous two-step process of capturing and receiving.
* Update debugging messages in Flowchart.cs
Clarified the debugging message when there's an existing join context. Removed unnecessary logging for "No pending work found", "No faulted activities found", and "Completing flowchart". This will make the debugging log less cluttered and more focused on relevant information.
* Refactor logging messages in Flowchart activity
The commit removes the verbose logging message indicating the completion of a terminal activity in the flowchart Context. This logging message was unnecessary and was generating excessive log messages. The log message for new join activities was also updated to accurately reflect the creation of a new join context.
* Disable SonarCloud analysis from workflow
The SonarCloud analysis steps, including scan setup, run and end steps have been commented out in the GitHub workflow. This is a temporary change to speed up build times while troubleshooting an issue.
* Uncommented SonarCloud analysis related code in packages.yml
In this commit, the parts of the code related to the set up of JDK 17, SonarScanner for .NET, Coverlet for code coverage, and SonarCloud analysis were uncommented in the GitHub Actions workflow packages.yml file. This will enable those tools and services during the execution of the workflow, improving code quality and test coverage.
* Change position of root assignment comment in .editorconfig
* Format method signatures in WorkflowRunner
Changed the method signatures in the WorkflowRunner class to be in a single line for readability and to follow coding standards. The refactor involves three RunAsync method overloads, contributing to the overall cleanliness and readability of the source code.
Logging functionality has been improved within the Elsa.Workflows.Core module. Logging has been introduced into the WorkflowRunner class, allowing for better tracking of workflow instance execution. Various debug log statements throughout the Flowchart activity have been removed or refactored to improve readability and efficiency of the code.
This commit adds validation for cron expressions in the DefaultTriggerScheduler class. The system now checks if the cron expression provided is empty and issues a warning if that's the case. This prevents attempts to schedule triggers with an empty cron expression, which would fail.
* Add JSON Serialization for Elsa expression
Extended the expression serialization. Added new classes ExpressionJsonConverter and ExpressionJsonConverterFactory implementing serialization of expression objects. Also, made respective changes in different serializers and related files for seamless integration.
* Fix XML comments
* Set initial builder Id in ClrWorkflowProvider
This commit involves a modification in ClrWorkflowProvider.cs where an Id was set for the builder. The Id was set with the format `workflowBuilderType.Name`:1.0, providing a deterministic identifier for each builder instance.
* Add MysteriousPondWorkflow and associated HTTP endpoints
A new workflow, MysteriousPondWorkflow, has been introduced along with HTTP endpoints to interact with it. The workflow simulates throwing an arbitrary amount of rupees into a mysterious pond and getting a luck prediction for the day based on the amount. An integration of this workflow is registered in the main Program.cs file, and the necessary directories to handle this workflow have been added to relevant project files.
In the DefaultTriggerScheduler.cs file, a wrong reference to _logger was corrected. It caused issues during attempts to log a warning when the 'cronExpression' parameter is empty. Now the correct local logger object is used.
This commit adds validation for cron expressions in the DefaultTriggerScheduler class. The system now checks if the cron expression provided is empty and issues a warning if that's the case. This prevents attempts to schedule triggers with an empty cron expression, which would fail.
The update involves optimizing the WorkflowDefinitionStore logic. The minor change is that it removed an unneeded space in the CountDistinctAsync method. More importantly, an upgrade issue with 'IsSystem' from older versions of Elsa to 3.2 has been rectified by adding checks and conditions to suit legacy versions. In the future, once all systems are updated, this check can be removed.
The `DefaultTriggerScheduler` received a significant refactoring, with the injection of the `ISystemClock` service and a modification of several method calls. Additionally, a check is included to avoid scheduling `StartAt` triggers if their execution time is in the past. For these triggers, an information message is logged and scheduling is skipped.
This commit introduces a validation check in the GenerateWorkflowInputAccessors handler before trying to get the workflow. This prevents any potential issues if the workflow execution context is not available or retrievable. The code flow now first attempts to get the workflow execution context and if it's not available, it will return a completed task.
The schema setup in ElsaDbContextBase has been refactored for better readability and more efficient coding. The '_schema' private variable has been removed, and the 'Schema' property is now set directly within the constructor. This eliminates the need for extra code to handle the '_schema' variable, simplifying the overall approach. Additionally, minor formatting adjustments were made for better consistency in the code block.
The MongoUserStore class was initially defined as an abstract class in the UserStore.cs file. This commit updates it to be a regular, non-abstract class to allow instantiation. This is particularly beneficial in cases where there is a need to create an instance of MongoUserStore.
This commit removes a number of unnecessary properties from the `WorkflowDefinitionModel` and `WorkflowDefinitionSummary` classes. These changes help simplify the models and focus on the core properties required for workflow definitions. Specific properties removed include `Id`, `CreatedAt`, `Version`, and status flags such as `IsLatest` and `IsPublished`.
* Implemented global readonly and workflow readonly
* Fixed bug of unfilled versions
* Fixed failing test
* Updated pipeline
* Revert
* Pushed fixes based on the PR comments and fixed history bug
* Implemented changes based on PR comments
* Fixed issue in caused by AuthorizationHandler not being able to receive null resources
* Remove unused Google.Protobuf dependency in Program.cs
An unused Protobuf library import was found in Program.cs file. In order to clean up the code and improve readability, this import statement has been removed. No other changes have been made.
* Refactor code to reduce redundancy and improve readability
Optimize code by removing unnecessary constructor assignments and simplify function calls. The simplification is mainly achieved by directly passing the required services as constructor parameters instead of assigning them to private fields first. This results in a more readable and less redundant code.
---------
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Add distributed locking to MassTransitWorkflowDispatcher
This commit introduces a distributed lock to the MassTransitWorkflowDispatcher to prevent concurrent updates to the workflow instance. The lock is acquired before any interaction with the workflow instance and is released after the update operation is complete.
* Refactor MassTransitWorkflowDispatcher for simplified code
Removed unnecessary code in the MassTransitWorkflowDispatcher.cs class, previously used to handle input and properties. Refactored to directly include input and properties in the DispatchWorkflowInstanceRequest object, increasing efficiency and readability.
* Remove unused IDistributedLockProvider dependency
The IDistributedLockProvider dependency in the constructor of MassTransitWorkflowDispatcher class was removed because it was identified as unnecessary in this context. This results in less complicated code and improved maintainability.
* Add bulk dispatch workflows unit tests
Added a new file `BulkDispatchWorkflowsTests.cs` that contains tests for Bulk Dispatch Workflows. Also, two new workflow files `EmployeeGreetingWorkflow.cs` and `GreetEmployeesWorkflow.cs` were added to define workflows used in the unit tests. This will help ensure the Bulk Dispatch Workflows feature is working as expected.
The configuration for DistributedLockProvider has been changed from the root level to under the Runtime section in appsettings.json. The corresponding call to get this value in code was also updated to reflect this change.
This commit introduces a distributed lock to the MassTransitWorkflowDispatcher to prevent concurrent updates to the workflow instance. The lock is acquired before any interaction with the workflow instance and is released after the update operation is complete.
* Add error handling with fault categories and codes
The code now includes error handling through the introduction of fault categories and codes. New files containing constants for fault categories and codes have been added for different modules. FaultException has also been updated to include these properties. Changes are evident in various files where FaultException is thrown for error handling.
* Add DotSettings file for Elsa.Alterations module
A new DotSettings file is added for the Elsa.Alterations module. This includes configuration for namespace folders to be skipped during CodeInspection.
* Renamed "DefaultFaultKinds" to "DefaultFaultTypes" and updated usages
This commit renames the class "DefaultFaultKinds" to "DefaultFaultTypes" and updates all its references across the project files. The change is made keeping the more accurate naming context i.e., 'Types' suits better in the thrown exception scenarios.
* Added failing unit test
* Added fix for error 'Instance property 'Id' is not defined for type 'Elsa.KeyValues.Entities.SerializedKeyValuePair' (Parameter 'propertyName')'
* Added Bson class map for SerializedKeyValuePair. Ignoring _id field mapping.
---------
Co-authored-by: Stephan Melzer <s.melzer@mera-petfood.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>