Updated the `StringData` property to allow null values, improving flexibility and aligning with usage scenarios where the property may not always contain a value. This change ensures better handling of optional data.
Introduce a new integration test to verify workflow serialization functionality, ensuring that newly created workflow definitions can be serialized and deserialized correctly. Adjust default nullability for certain fields in `WorkflowDefinition` to improve consistency and prevent null reference issues. Minor argument update in `New` method of `WorkflowDefinitionPublisher`.
Dropped .NET 6 support and upgraded projects to .NET 8 and .NET 9 frameworks. Updated several package dependencies to their latest stable or preview versions to ensure compatibility and leverage improvements.
Added logic to cancel child activities during activity cancellation. Removed redundant bookmark removal logic in the `Fork` activity for better clarity and efficiency.
Refactored `StorageDriverContext` to include `Variable` and updated its usage across relevant methods to ensure context accuracy. Enhanced `ObjectConverter` to support conditional deserialization of JSON objects. Adjusted `WorkflowInstanceStorageDriver` to utilize improved variable resolution with new conversion options.
Updated the log message to use the full variable type name instead of the base type. This provides more detailed context for debugging failed variable parsing issues.
Updated the exception message to use the full type name of the variable, providing clearer details for debugging type compatibility issues during variable value parsing.
Added `TryParseValue` method to handle parse errors gracefully and prevent crashes. Updated `VariablePersistenceManager` to log warnings when variable parsing fails, providing better debugging support and resilience during workflow execution.
Remove unused using directive in migration file
Deleted an unnecessary using statement for improved code clarity and maintainability. This cleanup has no functional impact on the migration.
Replaced 'default' with 'null' to improve clarity and better align with common C# practices for optional parameters. This change makes the code more explicit and easier to understand.
Introduced SemaphoreSlim for initialization and refresh methods to ensure thread safety in DefaultTenantService. Improved tenant unregistration to handle scope cleanup only when mappings exist. These changes enhance reliability and prevent race conditions during tenant operations.
Commented out state filtering logic to address issues with log sanitization. The raw value is now directly stored in the activity state until a redesigned solution is implemented.
Remove the "Deprecated" label from the display name for clarity while keeping the `Obsolete` attribute to indicate planned deprecation. This ensures better alignment between the display name and actual usage guidance.
Added JobKeyProvider to centralize job key and group name handling, simplifying Quartz job scheduling. Refactored QuartzWorkflowScheduler to use the new provider, improving maintainability. Updated QuartzSchedulerFeature to register the new provider and a startup task for job registration.
Replaced '&' with '&' in the XML documentation comment to ensure proper HTML encoding. This change improves compatibility and prevents potential rendering issues in documentation tools.
Added support for ordering workflow definitions and instances by their creation date when querying. This change replaces manual pagination and filtering logic with streamlined methods that utilize the new `WorkflowDefinitionOrder` and `WorkflowInstanceOrder` objects, improving code clarity and maintainability.
Updated the default Time-to-Live (TTL) from 10 seconds to 1 minute to allow bookmark queue items to persist longer. This change provides more flexibility and reduces the likelihood of premature purging in workflows.
This update includes the ActivityTypeName property in the mapping process for BookmarkQueueItem. It ensures more detailed information is carried during the mapping operation, enhancing traceability and debugging.
Added a call to save workflow variables in the BackgroundActivityInvoker to ensure that any changes are persisted during background activity execution. This helps maintain consistency and state integrity across workflow invocations.
Compilation of the Script wasn't entirely thread safe, specifically, if the same script was being evaluated twice at the same time on an empty cache:
Thread 1: Puts Script<T> into cache, then starts compiling it
Thread 2: Finds not yet compiled Script<T> in cache, starts compiling it as well
Thread 1: Done compiling, Assembly.Load it for running
Thread 2: Done compiling, Assembly.Load it <--- Exception: Assembly with name XYZ already loaded
The Solution is to use CreateDelegate which compiles the script the moment it is being put into the cache and the cache then only serves precompiled delegates that are immediately runnable.
Incorporated the TenantId field into the RunTaskWebhookPayload model and updated the RunTaskHandler to pass this information. This change enables multi-tenant support by including the tenant identifier in webhook payloads.
This commit introduces a schema registry functionality by adding interfaces and classes to manage schema registry definitions in the Elsa.Kafka module. It updates KafkaOptions to include schema registries and modifies classes to support schema registry configurations for producers and consumers. Additionally, it updates package references to include necessary dependencies for schema registry support.
* Fix race condition and add rate limiting to bookmark queue processing
Introduce rate-limited function invocation for bookmark queue processing using ThrottleDebounce library to optimize performance. Update related classes and interfaces to support asynchronous and cancellation-aware operations, improving system responsiveness. Adjust logging to provide more detailed information during bookmark queue handling.
* Enable workflows on bug branches
This change updates the GitHub Actions workflow configuration to trigger on branches with the 'bug/*' pattern. This allows for automated actions on bug fix branches alongside the main branch, improving development and testing processes.
Add a new method `UnscheduledAsync` to unschedule jobs across various components, including the job queue, background activity scheduler, and Hangfire integration. This enhancement provides a more robust way to remove jobs from scheduling, complementing the existing cancellation functionality.
This fixes an issue where a background activity execution job that resumed a workflow, which in turn would remove any associated bookmarks, which in turn would cancel the background job while that job is still executing and has to e.g. persist changes made to the DB.
* Add synthetic properties to JS engine for exclusion
This fixes an issue where inputs would be declared as new variables, causing a "miss" when trying to read the input.
* Add InputOutput workflows and tests for data exchange
Introduce new Consumer and Provider JSON workflows to facilitate testing of input and output functionalities, ensuring seamless data exchange between processes. Implement corresponding tests to verify the correct reception and transmission of input data within the Provider workflow back to the Consumer, validating the setup with an assertion for expected output. Update the project configuration to include these workflows in the build output.
This was broken by both #5871 and #5682:
1. When a List<Guid> was serialized, it was recognized as a primitive collection and thus plainly written to the JSON without any type information: ["d4d8404c-4357-47ff-a343-649a116539f5"]
2. When this JSON was deserialized, due to lack of type info, it was deserialized as List<object>, containing strings. This is already not good.
3. When this List<object> gets serialized again (e.g. due to multiple workflow suspends causing WorkflowState serialization), this time it fails the primitive collection recognition, because object is not a primitive type. It now gets serialized as {"_items": ["d4d8404c-4357-47ff-a343-649a116539f5"], "_type": "Object[]"}
4. When that JSON gets deserialized, it tries to ReadType() but ReadType() fails to parse Object[] since it lacks the logic from TypeJsonConverter to throw away the [] before looking up Object in the WellKnownTypeRegistry, so it returns null as a type. Without a type but being faced with a json object { ... } it now deserializes into an ExpandoObject
5. Any further serialization / deserializations will now cause the expando object to get nested deeper and deeper every time.
Moved WorkflowStorageDriver and WorkflowInstanceStorageDriver to a new namespace, VariableStorageDrivers, to improve organization. Updated namespaces in related services and ensured backward compatibility with comments. Minor fix made to TypeJsonConverter for consistency and additional configuration adjustments to support the new structure.