Commit graph

4844 commits

Author SHA1 Message Date
Sipke Schoorstra d83bb3b834 Add customizable tenant header support for HTTP routing
Introduced `MultitenancyHttpOptions` to configure the tenant header name used for HTTP routing. Updated `HeaderTenantResolver` to utilize this option and modified the server setup to allow overriding the default header name. This enables more flexible multitenancy configurations.
2025-02-09 08:24:55 +01:00
Sipke Schoorstra 484a126693
Merge branch 'patch/3.3.3' 2025-02-07 13:29:43 +01:00
Sipke Schoorstra fe038f9a12 Add obsolete ExecuteAsync overloads for job classes
Introduce `[Obsolete]` ExecuteAsync overloads in job classes to support legacy calls while encouraging migration to preferred methods. `[UsedImplicitly]` annotations ensure these methods are retained for compatibility.
2025-02-07 12:48:30 +01:00
Matthew Knibbs f7c5c83493 Resolves Directory.Packages.props formatting error. 2025-02-07 02:55:29 +00:00
Matt 1029580712
Merge branch 'main' into main 2025-02-06 21:20:12 +00:00
Sipke Schoorstra b57763a74c
Merge branch 'patch/3.3.2' 2025-02-06 21:05:22 +01:00
Sipke Schoorstra 5d21bcb4a9 Improve null handling and add job retry configuration
Updated null checks for job types in Hangfire extensions to prevent potential runtime errors. Added Hangfire's `AutomaticRetry` attribute to RunWorkflowJob and ResumeWorkflowJob to configure retry behavior. Simplified object initialization in WorkflowDefinitions List endpoint.
2025-02-06 19:32:08 +01:00
Sipke Schoorstra 1f78dbae57
Add taskName parameter to job execution methods
This change updates job scheduling and execution methods to include a taskName parameter. It ensures a unique identifier is passed for each job, improving tracking and consistency in job handling. Additionally, documentation comments were updated to reflect this new parameter.
2025-02-06 16:58:32 +01:00
Sipke Schoorstra a084353938
Merge pull request #6370 from yinzara/feature/alterations-client-api
Added Alterations API to Client API library and updated server API co…
2025-02-06 16:45:25 +01:00
Sipke Schoorstra aa09708268
Merge pull request #6343 from elsa-workflows/feature/4835
Controlled Commit States Feature Implementation
2025-02-06 16:44:48 +01:00
Sipke Schoorstra 7a758f8850 Fix multitenancy support in Hangfire services and jobs
Refactored Hangfire-related services and jobs to include tenant context management using ITenantAccessor and ITenantFinder. Updated job constructors and method signatures to support tenant-specific execution. Improved exception-throwing syntax for better readability in BackgroundActivityInvoker.
2025-02-06 16:39:38 +01:00
Marius Vasile Vușcan 59849bc1bb
Exposed incidents in the Elsa.Api.Client 2025-02-06 12:52:32 +02:00
Sipke Schoorstra babf1125ff Refactor ArgumentJsonConverter to improve type alias handling
Introduced logic to handle type aliases more accurately for arrays and collections. Enhanced the final type alias determination by accommodating cases where type aliases are present. Cleaned up unnecessary whitespace for better code readability.
2025-02-06 10:56:43 +01:00
Sipke Schoorstra cf2ac05e92 Refactor ArgumentJsonConverter to improve type handling.
Enhanced type handling by distinguishing arrays, collections, and single types. Added support for "isCollection" metadata and adjusted serialization/deserialization logic to ensure accurate mapping of element types and aliases. This improves clarity and flexibility in JSON representation.
2025-02-06 10:44:04 +01:00
Matt Vance cc39f122eb
Added Alterations API to Client API library and updated server API comments 2025-02-03 16:14:42 -08:00
Sipke Schoorstra 69cdc41782 Remove obsolete migration files from Oracle project.
The migration files `20250131185451_V3_3_2` and related metadata were removed from the project configuration. This cleanup ensures the project references only necessary and relevant resources.
2025-02-01 00:49:19 +01:00
Sipke Schoorstra 2bb3af1e5d Fix Oracle migrations 2025-02-01 00:38:38 +01:00
Sipke Schoorstra 6c0d1ea66c Refactor database setup and EFCore provider configurations.
Revised database initialization scripts to better handle Postgres and Oracle environments, introduced schema-specific configurations for Oracle EFCore, and cleaned up obsolete or redundant entity model setup. Streamlined project structure by relocating and renaming files for SQLite and Oracle EFCore setups, improving maintainability and readability.
2025-01-31 19:51:24 +01:00
Sipke Schoorstra 006e0bbbb4 Ignore EF Core pending model changes warnings and update Oracle DSN.
Added configuration to suppress EF Core PendingModelChangesWarning for better compatibility with newer .NET versions. Updated Oracle connection string to use "localhost" for consistency and clarity in appsettings.json.
2025-01-31 00:52:49 +01:00
Sipke Schoorstra 26e2b1fb56 Add Oracle database support to the project
This commit introduces Oracle database integration by adding necessary configurations, entity mappings, and Docker Compose setup. Oracle-specific mappings ensure compatibility with NCLOB for large data handling. The changes also include updates to appsettings, enum for SqlDatabaseProvider, and project references to support Oracle.
2025-01-31 00:31:09 +01:00
Sipke Schoorstra e54e116977 Fix activity output
Updated `ActivityOutputRegister` to always return the last output value. Added new integration test to validate the functionality.
2025-01-30 22:56:30 +01:00
Sipke Schoorstra ca0dcd2f83
Refactor commit state behavior to use commit strategies
Replaced `ActivityCommitStateBehavior` with a more flexible commit strategy approach utilizing `CommitStrategyDescriptor`. Updated relevant APIs, services, and UI components to support the new model, enhancing configurability and maintainability.
2025-01-30 21:24:27 +01:00
Sipke Schoorstra 47a7c31714 Refactor commit strategies API to unify descriptor model.
Standardized commit strategy descriptors across workflows and activities by introducing a shared `CommitStrategyDescriptor` model. Updated API endpoints and conversion logic to adopt this unified approach, improving consistency and reusability. Implemented new interfaces in the client API for listing commit strategies.
2025-01-30 18:32:15 +01:00
Sipke Schoorstra 2402bacaba Remove custom JSON converter for workflow commit strategies.
Eliminated `WorkflowCommitStateStrategyJsonConverter` and its usage in the `IWorkflowCommitStrategy` interface. This simplifies serialization logic and reduces unnecessary complexity in the codebase.
2025-01-30 18:11:35 +01:00
Sipke Schoorstra 01a41f6d62 Refactor commit strategies to use AddStandardStrategies method
Extracted commit strategies setup into a reusable AddStandardStrategies method for better code clarity and modularity. Simplified PeriodicWorkflowStrategy by replacing the factory method with a constructor-based interval initialization. These changes improve maintainability and reduce redundancy across the codebase.
2025-01-30 18:10:38 +01:00
Sipke Schoorstra ef97ef415f Update strategy registration methods to use 'Add'
Replaced 'RegisterStrategy' with 'Add' in strategy registration methods for both workflows and activities. This simplifies the naming, enhances consistency, and aligns with modern API design principles.
2025-01-30 15:20:51 +01:00
Sipke Schoorstra 166c1bc117 Add endpoints for listing workflow commit strategies
Introduced two API endpoints to list activity and workflow commit strategy registrations. Updated the project file to include the new directory structure for the endpoints. These endpoints provide unified responses from the respective registry implementations.
2025-01-30 15:19:51 +01:00
Sipke Schoorstra e151810600 Refactor commit strategy architecture for flexibility.
Replaces direct strategy registration with metadata-based registrations, introducing `ObjectRegistration`, `CommitStrategyMetadata`, and associated helpers. Updates existing strategies and APIs to use the new metadata-driven approach, improving extensibility and maintainability.
2025-01-30 15:14:58 +01:00
Sipke Schoorstra 4b308cc94a Refactor commit strategy naming and implementation
Renamed `CommitStateStrategy` to `CommitStrategy` for consistency and clarity. Updated method names, property names, and logic to reflect the new naming convention. Improved null handling when setting commit strategy properties.
2025-01-30 14:29:04 +01:00
Sipke Schoorstra ce859efc4a Refactor commit state handling with a strategy-based approach
Replaced the legacy commit state behavior enums and options with a flexible, strategy-based system for activities and workflows. Introduced new interfaces, models, and strategies to enable fine-grained control of commit state logic. Updated related code to integrate the new commit strategies, ensuring modular and extensible commit handling.
2025-01-30 11:59:47 +01:00
Sipke Schoorstra d93d67cada
Merge branch 'main' into feature/4835 2025-01-30 09:17:38 +01:00
Sipke Schoorstra d500817468 Simplify DbContext creation with ActivatorUtilities.
Replaced Activator.CreateInstance with ActivatorUtilities.CreateInstance to streamline the DbContext instantiation. This improves dependency injection support and ensures better compatibility with service provider configurations.
2025-01-29 19:03:59 +01:00
Sipke Schoorstra f4a31079b7 Refactor activity execution context removal logic.
Updated methods to ensure proper cleanup when removing activity execution contexts, including handling parent-child relationships. Improved robustness and clarity by introducing step-by-step removal for multiple contexts.
2025-01-29 16:18:59 +01:00
Sipke Schoorstra 7f86799393
Merge branch 'main' into feature/4835 2025-01-29 13:39:31 +01:00
Sipke Schoorstra 4d7b551d79 Add support for ExpandoObject attachments in email sending
This update enables handling ExpandoObject as email attachments by extracting relevant properties like FileName, ContentType, and Content. It ensures proper parsing of the content and supports both byte arrays and streams for attachment data.
2025-01-29 11:24:13 +01:00
Sipke Schoorstra 0560d11432 Improve JSON array conversion in ObjectConverter
Refactored ObjectConverter to handle JSON array conversions more robustly, including support for arrays of complex types. Added a `Person` class for unit testing and updated tests to validate the new functionality. Included necessary project reference updates to ensure proper functionality.
2025-01-29 10:50:42 +01:00
Sipke Schoorstra 0eec9693f7 Refactor and optimize workflow execution context handling.
Replaced inline filtering logic with reusable methods to simplify and unify activity execution context management. Introduced `ClearCompletedActivityExecutionContexts` to remove redundant contexts and migrated filtering logic to `WorkflowExecutionContext`. Improved code clarity and maintainability by removing duplicate methods and streamlining exception throwing.
2025-01-28 20:59:27 +01:00
Sipke Schoorstra 8bc6fa6a57 Refactor activity context management and state handling.
Replaced `ActivityExecutionRecordExtractor` with a `ChangeTrackingDictionary` for better state mutation tracking in activity execution contexts. Introduced tainting mechanisms to track dirty states and ensure precise logging and persistence of activity execution logs. Updated several components like `ActivityExecutionLogSink` and `ExpressionExecutionContext` to utilize these changes effectively.
2025-01-28 20:24:53 +01:00
Sipke Schoorstra 7dc6220175
Merge branch 'main' into feature/4835 2025-01-28 13:53:58 +01:00
Sipke Schoorstra 9437ab3a3d Refactor initialization of ObsoleteWorkflowRuntime.
Replaced direct instantiation of `ObsoleteWorkflowRuntime` with `Lazy<ObsoleteWorkflowRuntime>` across multiple runtime services to avoid circular dependency resolution.
2025-01-28 13:53:22 +01:00
Sipke Schoorstra dbd89905c8 Remove redundant PreviousSubStatus assignment in workflow context
The PreviousSubStatus assignment was removed as it was unused and unnecessary. This cleanup simplifies the code and ensures focus only on relevant functionality.
2025-01-28 11:40:14 +01:00
Sipke Schoorstra 633464eb04
Merge branch 'main' into feature/4835 2025-01-28 11:17:14 +01:00
Sipke Schoorstra 9a5181a3d7
WIP on feature/4835 2025-01-28 11:17:02 +01:00
Sipke Schoorstra 4a4657b4a4
Merge branch 'main' into feature/4835 2025-01-28 10:57:52 +01:00
Sipke Schoorstra e2a57aca35
Merge pull request #6344 from elsa-workflows/task/restore-previous-workflow-runtime-api
Restore old workflow runtime API
2025-01-28 10:37:46 +01:00
Sipke Schoorstra 9f01e148a9 Deprecate and clean up legacy workflow runtime components.
Marked various types as obsolete, advising migration to `CreateClientAsync` methods or `IBookmarkQueue` services. Removed unused `Deprecated` namespace imports, aligning code with updated runtime standards.
2025-01-28 09:26:46 +01:00
Sipke Schoorstra ee883dbd07 Refactor workflow runtime to use ObsoleteWorkflowRuntime delegation
Replaced direct method implementations in workflow runtimes with delegations to the new `ObsoleteWorkflowRuntime` class, simplifying the codebase. This consolidates logic and aligns the runtimes under a unified deprecated API layer.
2025-01-28 09:18:24 +01:00
Sipke Schoorstra e27101032b Incremental work on central obsolete workflow runtime for reuse 2025-01-28 00:32:43 +01:00
Sipke Schoorstra 60323d0522 Refactor CanStartWorkflowResult to use compact constructor.
Simplified the object creation in `CanStartWorkflowResult` by using a concise constructor format. This improves code readability and reduces verbosity without altering functionality.
2025-01-28 00:22:20 +01:00
Sipke Schoorstra db1556fd0b Update ProtoActorWorkflowRuntime to implement backwards-compatible workflow runtime API 2025-01-28 00:21:49 +01:00