Merge scope change into main (#4738)
* Feature/change singleton to scope (#4635)
* feat(scoped): move dependencies to scoped instead of singleton if possible.
* fix(scoped): Timer and LiveTest
* fix(scoped): change scope of python and csharp features
* fix(scoped): remove FireAndForgetStrategy and replace if by BackgroundStrategy
* fix(scoped): add .editorconfig to avoid changing the sort order of using (system.* first) and fix the scope in BackgroundEventPublisher
* Update title in README.md
The README.md file has been updated to reflect the new version of Elsa - Elsa 3.0.
* Remove npm-packages workflow, adjust branch triggers in workflows
The npm-packages.yml workflow has been removed. The branch triggers in the workflows npm-packages.yml, packages.yml, and all-in-one-web.yml have been changed from 'v3' to 'main'. An unnecessary reference to the deleted workflow file npm-packages.yml is also removed from Elsa.sln.
* Remove obsolete files from designer packages
Numerous unused and obsolete files have been removed from various designer packages including angular-workspace, elsa-workflows-designer, react-workspace, and others. This cleanup enhances the maintainability of the project by eliminating unnecessary files and reducing clutter.
* Add badges to README.md
The README.md file has been updated to include badges for packages, continuous delivery, and discussions related to Elsa workflows. These badges provide quick access to key information and resources like Nuget, npm, GitHub Actions, feedz.io, Docker, Discord, Stack Overflow, and subreddit subscribers.
* Update README with enhanced instructions for Elsa server and studio
The README updates include specific instructions for running the Elsa server on port 5001 and the Elsa studio application on port 6001. These enhanced guidelines provide comprehensive steps for configuring the applications regarding authentication, module usage, and use of API endpoints.
* Add IsWorkflowDefinitionActivity method to ActivityExtensions
A new method, GetIsWorkflowDefinitionActivity, has been added to the ActivityExtensions class. This method checks a given JsonObject representing an activity to determine if it's a workflow definition activity. It returns true if the activity indeed is; otherwise, it returns false.
* Refactor MassTransit & AzureServiceBus configuration and delete unnecessary options
AzureServiceBusOption.cs and RabbitMqOptions.cs files were removed as they're no longer needed. The system now defers the configuration of MassTransit and AzureServiceBus to the application layer (Program.cs). The configuration for PrefetchCount is also allowed at the transport-level. A new abstraction, ConsumerTypeDefinition, collects all the consumer types with their respective definitions if provided. Adjustments have been made in related extension methods and classes to reflect these changes.
* Enhance configuration options for MassTransit
This commit enhances the configuration options for the MassTransit integration, providing additional settings for both Azure Service Bus and RabbitMq. It also refines the MassTransit workflow dispatcher configuration by allowing for custom dispatcher options. A default RabbitMq connection string has been added to the appsettings.json.
* Renamed AI file
* Update Elsa.Studio package versions
The package references for Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm in Elsa.AllInOne.Web and ElsaStudioWebAssembly projects were updated. The version has been changed from 3.0.0-preview.160 to 3.0.0-preview.164 to incorporate the latest features and bug fixes.
* Reorganize README and add Docker instructions
The README file was reorganized to make it more readable by grouping related badges together. Additionally, instructions on how to start the Elsa Docker container were appended for users who want to quickly try out the Elsa Studio and Elsa Server.
* Update description in README.md
The current diff modifies the description of the Docker image in the README file. The revised description consolidates information about the image, its reference ASP.NET application nature, and its non-production intention into a single, more succinct sentence.
* Add tests for implicit joins and fix duplicate activity scheduling
This commit includes new integration tests for implicit join scenarios. The tests ensure that join and parallel join activities execute correctly and complete as expected. Additionally, a change has been made to the workflow execution context to prevent duplicate activity scheduling. Now, aside from checking if the activity is already scheduled, it also checks if the activity is scheduled for the specified owner.
Fixes #4703
* Add ExpressionEvaluatorOptions to JavaScriptEvaluator
The JavaScriptEvaluator now accepts an options parameter of type ExpressionEvaluatorOptions. This allows adding custom arguments to the evaluation context. An 'Empty' static instance of ExpressionEvaluatorOptions is added for convenience. Additionally, the usage of MassTransitAzureServiceBus in Program.cs is turned off by setting the flag to 'false'.
* Update README to add access information when user tried to run elsa with docker (#4708)
* [no ci] add link to Elsa 2 in README
* Remove Console and ASP.NET examples, simplify README.md
Simplified README.md by removing in-depth Console and ASP.NET Core examples, as well as mentions about building from source, serving overall clarity and readability. Added descriptions for coded and visual workflow design possibilities.
* Implement batch processing in BulkDispatchWorkflows
The changes introduce a batch processing mechanism in the BulkDispatchWorkflows activity. Previously, each workflow was dispatched individually. Now, the process groups the workflows in batches, processes each batch concurrently, and handles errors. This change improves performance, particularly for large data sources.
* Refactor workflow methods for async execution
Modified methods in the WorkflowInstance.cs to implement re-entrant approach for asynchronous execution. This is achieved by replacing 'await' with task-based calls passed through the Context.ReenterAfter method, providing more efficient non-blocking operations. Minor changes were also made in ClusterExtensions.cs and ProtoActorWorkflowRuntime.cs, including code clean up and slight modifications to maintain consistency.
* Refactor background activities scheduling
Background activities scheduling was moved to its own middleware where the actual scheduling happens instead of in the invoking middleware. Removed ScheduleBackgroundActivities.cs handler and added ScheduleBackgroundActivitiesMiddleware.cs instead. As a part of this change, restructured BackgroundActivityInvokerMiddleware to BackgroundActivityCollectorMiddleware, and updated all relevant references.
Minor modifications to a few other files include changes in their package dependencies and activity kind settings.
* Change ActivityKind from Job to Task in BulkDispatchWorkflows
The ActivityKind property in BulkDispatchWorkflows class has been changed from Job to Task. This updates the type of activity associated with the BulkDispatchWorkflows process within the Elsa workflow runtime module.
* Update BulkDispatchWorkflows activity
The BulkDispatchWorkflows.cs activity in Elsa.Workflows.Runtime module has been updated with some key changes: Added detailed description to the input element, introduced the dispatchedInstancesCount to accurately track the number of instances dispatched, and removed some unnecessary white spaces for improved readability.
* Add methods to handle activity run asynchronously flag
New methods have been added to handle the custom property 'runAsynchronously' on a JsonObject activity. These methods will help in getting and setting a value that indicates whether a specified activity can trigger a workflow asynchronously. This additional level of control can enhance workflow execution based on specific requirements.
* Add 'Persister' to UserDictionary in DotSettings
The new dictionary entry for 'Persister' has been added to Elsa.sln.DotSettings. This expands the vocabulary of the solution's user dictionary and ensures that 'Persister' is recognized as a valid term within the project context.
* Add Bookmark Persister and Bookmark Updater
The code introduces BookmarkPersister for processing bookmarks as part of the workflow runtime. This refactoring improves readability and maintainability by separating the bookmark persisting logic from the PersistBookmarkMiddleware class. A new class, BookmarkUpdater, is also added to handle updating of bookmarks. Changes also include adjustments to several other classes for improved functionality and code consistency.
* Add bookmarks processing to DefaultBackgroundActivityInvoker
The code addition includes two dependencies, IBookmarksPersister and IWorkflowStateExtractor, in the DefaultBackgroundActivityInvoker service. With these changes, during the workflow execution phase, bookmarks are captured and processed for any state changes. These modifications provide more control and efficiency over handling workflow states during the system's background operations.
* Update workflow handling and simplify codebase
Refactored the workflow handling logic and simplified numerous components in the codebase. Major changes include the enhancement of the Workflow Runtime handler, altering the broadcast and deliver functions in the Default Workflow Inbox, and the removal of unnecessary details in the Workflow Runtime feature. Also, unnecessary services and requests were removed for better code efficiency and readability.
* Add conversion support for long type in ObjectConverter
The ObjectConverter file has been updated to support conversion of 'long' type. This is done by adding an additional conditional statement for checking the underlying source type for 'long', then returning the converted value.
* Add 'Noop' method to WorkflowExecutionContext
A Noop method has been added to the WorkflowExecutionContext, and is now assigned to the ExecuteDelegate field when no resumption point is specified. The change, will prevent the invocation of the regular "ExecuteAsync" method, closing the activity without additional operations.
* Add AutoComplete option to workflow bookmarks
The AutoComplete option has been added to the workflow bookmarks, which determines whether the activity should automatically be completed if no callback is specified. This change improves the flexibility of bookmark creation and impacts various workflow elements and procedures. The corresponding adjustments have been made at functions where bookmarks are used or created.
* Refactor object initialization in ActivityExecutionContext
Refactoring was performed in the ActivityExecutionContext class to use object initializers for readability and clarity. This modification mainly targets the CreateBookmark and ScheduleActivityAsync methods, making their code more explicit and thus easier to understand.
* Refactor code for readability and improved logging
Code in several activity files and Worker.cs that involve creating bookmarks and handling messages received was refactored to improve readability and clarity. The instantiated "CreateBookmarkArgs" parameter was split into its individual arguments for improved readability. Logging in the Worker.cs file was also fine-tuned, with explicit count of workflows triggered by service bus messages being included in the debug log.
* Refactor code structure for ServiceBus Integration tests
Refactored the ServiceBus Integration tests for improved readability and maintenance. The changes included reducing the number of lines by removing unnecessary curly braces, removing unnecessary use of 'this' qualifier, replacing null checks with null-conditional operators, and organizing various code blocks for better understanding.
* Remove specific activity instance bookmarks
The change clears specific activity instance bookmarks in the context from the WorkflowExecutionContext. This is an extra step in the process of clearing bookmarks, which assists in managing and cleaning up workflow state effectively.
* Update Elsa.Studio.Login.BlazorWasm version
The version number of Elsa.Studio.Login.BlazorWasm has been updated in the Elsa.AllInOne.Web.csproj file. This change reflects the newest release, moving from version 3.0.0-preview.164 to 3.0.0-preview.167.
* Update artwork
* Implement pagination for activity descriptor fetching
Updated the WorkflowDefinitionActivityProvider code to fetch activity descriptors in a paginated manner. This change will be useful to avoid overloading system resources when interacting with large amounts of data. It retrieves a limited number of descriptors per request, looping until all are fetched.
Closes #4689
* Refactor task payload extraction and update workflow builder
Modified the way task payload is extracted in the OrderFoodTaskHandler.cs for more robustness. The input parameter of the workflow builder in the HungryWorkflow.cs file has also been refactored for efficiency. Making these tweaks streamlines management of values within the tasks.
* Update localhost port for workflow sample
The localhost port for the Elsa.Samples.AspNet.RunTaskIntegration has been updated from 7211 to 5001 in both the run-workflow.http and launchSettings.json files. This adjustment ensures that the workflow sample correctly points to the new localhost port, maintaining synchronization within the application.
* Refactor ExpressionExecutionContextExtensions module
Modified the GetInput methods to consider the case where the method is called within a composite activity, ensuring that only local variables have precedence over workflow input when executing within a composite activity.
* Feature HTTP Activity : Allow adding Authorization Header without validation (#4721)
* Add capability to add Authorization Header without validation
* Refactor authorization header handling in HTTP requests
This commit simplifies the syntax for input attributes in the SendHttpRequestBase.cs module. It also renames the boolean value `AddAuthorizatonHeaderWithoutValidation` to `DisableAuthorizationHeaderValidation` for more clarity. This change improves code readability and understanding in relation to handling authorization headers in HTTP requests.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Add a more generic UIHandler to customize how inputAttributes can be handle by UI (#4688)
* add a more generic UIHandler to customize how inputAttributes can be handle by the ui
* Add IPropertyUIHandlerResolver and update PropertyUIHandlerResolver
Introduced a new interface, IPropertyUIHandlerResolver, to resolve UI options for a property. Refactored PropertyUIHandlerResolver to implement this interface and removed the unnecessary partial class structure. Also, cleaned up some unnecessary usings in various files for better code organization.
* Refactor variable name and description in InputDescriptor
The 'uISpecifications' variable in the InputDescriptor model is renamed to 'uiSpecifications' for better readability. Additionally, the associated comment was revised to explain that the dictionary is used by the UI.
* "Refactor codebase for improved organization and cleaner architecture"
The codebase has been significantly refactored, moving several classes to more appropriate namespaces for improved organization and cleaner architecture. This includes shifting UI hint handlers, activities, and memory-related components, amongst others. The changes should improve code readability and maintainability, but as this is a broad refactoring effort, thorough regression testing is advised.
* Add CheckList UIHint with associated handler and provider
This update introduces a new UIHint called CheckList to the Elsa.Workflows.Core. This includes the necessary handler and provider classes. The handler is registered in the WorkflowsFeature.cs, and the CheckList UIHint key has been added to the InputUIHints.cs. Various associated files have been created in both the Elsa.Api.Client and Elsa.Workflows.Core project to support this new UIHint.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Update GitHub actions for packages publishing
This update changes the trigger for the package publishing action to only 'published' releases and prereleases. It also segregates the publishing mechanism into two separate actions: one for publishing preview packages to nuget.org, and another for publishing release packages. This change provides better clarity and control over the publishing process.
* Update FastEndpoints package and enable JWT Bearer Auth
The FastEndpoints package was updated to '5.20.1.7-beta' from '5.20.0-rc1'. Enabling JWT Bearer Authentication was also set from 'false' to 'true' in the SwaggerExtensions file. Removed conditions that were limiting the addition and usage of Swagger to .NET 6.0 or 7.0, which allows the Swagger to be used in any environment.
* Refactor input output assignment and JSON converter
The code has been updated to provide clear and meaningful block reference names using the Humanizer library in the IdentityGraphService. The redundancy in assigning input/output Id's in both IdentityGraphService and InputJsonConverter has also been removed, resulting in cleaner, less convoluted code.
* Enhanced script language support in Elsa.AllInOne.Web
This update introduces expanded language support in Elsa.AllInOne.Web. The changes allow CLR access in JavaScript, and also introduce the ability to use both C# and Python. The changes also include adding project references for the C# and Python modules.
* Add logging to PythonGlobalInterpreterManager
Implemented logging in the PythonGlobalInterpreterManager class to ensure visibility during Python engine initialization and shutdown. These changes are important for spotting errors, troubleshooting issues, and understanding potential failures in Python engine initialization.
* Refactor project structure and Docker configurations
The changes included in this commit are made to refactor the project structure and Docker configurations. Previously, the application was structured around the AllInOneWeb solution, but it has been split into Server.Web and ServerAndStudio.Web solutions for better separation of concerns. Additionally, the Docker configurations have been updated to reflect the new structure, which should streamline the build and deployment process.
* Add GitHub Actions workflows for Elsa Docker images
This commit introduces two new GitHub Actions workflows: one for building and deploying the Elsa Server + Studio Docker image, and another for the Elsa Server Docker image. Both processes automate the build and push actions to Docker Hub using the latest ubuntu version and buildx for multi-platform support.
* Update Dockerfiles and add Python 3.11
Working directories in both ElsaServer.Dockerfile and ElsaServerAndStudio.Dockerfile have been updated for better consistency. Additionally, Python 3.11 has been installed in the ElsaServer.Dockerfile, accompanied by relevant environment variables and symbolic links to improve interoperability.
* Update Dockerfiles for Python 3.11 installation
Added lines in Dockerfiles to install Python 3.11 and set the PYTHONNET_PYDLL environment variable. This enhancement helps to ensure compatibility with recent Python updates and improves general performance.
* Add Elsa.Studio.Web project to the solution
A new project, Elsa.Studio.Web, was added to the solution which included adding appropriate configuration files, host pages, project settings and important dependencies. Necessary adjustments were also made in Elsa.ServerAndStudio.Web.csproj to match with the latest updates.
* Add Docker build script for Elsa Studio
This commit introduces a Dockerfile for the Elsa Studio application and a corresponding GitHub workflow for building and deploying the Docker image. These make it possible to automatically build and deploy Elsa Studio as a Docker image.
* Update Elsa.Studio package versions
Updated the version of Elsa.Studio and Elsa.Studio.Login.BlazorWasm from '3.0.0-preview.169' to '3.0.0-preview.170' in Elsa.Studio.Web and Elsa.ServerAndStudio.Web projects. This is to keep the dependencies up to date and leverage any enhancements or bug fixes in the new version.
* Update Elsa.Studio packages to version 3.0.0-preview.171
The Elsa.Studio and Elsa.Studio.Login.BlazorWasm packages are updated from version 3.0.0-preview.170 to 3.0.0-preview.171 in both Elsa.Studio.Web and Elsa.ServerAndStudio.Web projects. The updated packages include satisfying the latest enhancements and bug fixes.
* Update Elsa.Studio package versions
The Elsa.Studio package versions in ElsaStudioWebAssembly project have been updated from "3.0.0-preview.164" to "3.0.0-preview.171". The packages include Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm.
* Add CodeEditorOptions, EditorHeight, and MultiLineOptions classes
This commit introduces three new classes to the CodeEditor namespace. CodeEditorOptions provides various configuration options for the code editor while EditorHeight defines available height options. MultiLineOptions is specifically built for managing multi-line editor settings.
* Update Elsa.Studio packages to version 3.0.0-preview.172
The packages Elsa.Studio, Elsa.Studio.Login.BlazorWasm and Elsa.Studio.Core.BlazorWasm have been updated to version 3.0.0-preview.172 in the Elsa.Studio.Web, Elsa.ServerAndStudio.Web, and ElsaStudioWebAssembly projects.
* Add non-generic GetVariable method and Python accessors
A non-generic version of GetVariable method has been added to the ExecutionContextProxy.cs, allowing direct access to variables without specifying a type. To leverage this, Python accessors for getting and setting workflow variables have been added to GenerateWorkflowVariableAccessors.cs. This enhances the interaction between the Python scripts and the context variables.
* Add UI hints to input fields in workflow core modules
Changed a number of instances in both activities and UI Hints classes across multiple modules in the workflow core to utilize UIHints. The UI hint "DropDown" has been added to relevant input fields to improve the user interface. Special handling for Enum properties in the drop-down options provider has also been created.
* Update HTTP endpoint authorization handler
The default authorization handler for HTTP endpoints is now the AuthenticationBasedHttpEndpointAuthorizationHandler instead of the AllowAnonymousHttpEndpointAuthorizationHandler. The configuration was updated in HttpFeature.cs and the override in Program.cs was removed. This provides more security to HTTP endpoints by requiring authentication.
* Add JSON editor UI hint to HTTP activities
This commit introduces a JSON editor UI hint to HTTP activities within Elsa Workflow. It includes creating new classes for a JSON editor options provider and a handler for this UI hint. Also, these additions are registered within the Elsa Workflow. The hint is applied to the 'RequestHeaders' and 'ResponseHeaders' input fields found in HTTP-related activity classes.
* Add UI hints for HTTP endpoint and single line fields
Introduced HttpEndpointPathUIHandler to provide additional UI options for the Path input field in the HTTP Endpoint activity. This commits also adds SingleLineProps to offer more options for SingleLine input fields across different modules. The implementation improves UI component interactions.
* Update Elsa.Studio packages to version 3.0.0-preview.174
The Elsa.Studio, Elsa.Studio.Login.BlazorWasm, and Elsa.Studio.Core.BlazorWasm packages have been updated to version 3.0.0-preview.174 across multiple projects. The updated packages should provide the latest functionalities and fixes from the Elsa framework.
* Add API key authentication for Elsa client
Introduced an `ApiKeyHttpMessageHandler` to use an API key as the authorization header for Elsa API client. This ensures secure interaction with the Elsa server. Also made updates to the `ElsaClientOptions` class to include the API key. An `AddElsaClient` method is added with the API key parameter in `DependencyInjectionExtensions` class for convenience.
* add sample CustomUIHandler
* Fix Httpendpoint Path
* Refactor parameter in AddElsaClient method
The parameter "configureOptions" in the AddElsaClient method has been renamed and refactored to allow direct HTTP client configuration. This change enables the actions for configuring the HTTP client to be passed directly, providing greater flexibility for customization.
* Add extension method to get workflow instance ID
This adds a new extension method in HttpResponseMessageExtensions class which retrieves the workflow instance ID from the response. It also includes a HeaderNames class to maintain the consistency of header names used by the Elsa API.
* Remove ElsaClient and related interfaces
Files ElsaClient.cs, IElsaClient.cs and IElsaClientFactory.cs have been deleted from the Elsa.Api.Client project. The commit also includes an update in the DependencyInjectionExtensions.cs file where IElsaClient service registration is removed, reflecting these changes.
* Add condition to return json as string
A condition has been added to check if the returnType is of type 'string'. If so, the json is returned as string directly without converting. This is particularly useful to avoid unnecessary conversion when the returnType is already a string.
* Disable PythonEngine Shutdown to prevent deadlock
* Improve variable resolution in workflow activity
Added a reference to Variable.Id in the SetVariable activity within the Elsa.Workflows.Core module to ensure the correct variable scope is utilized. This change enhances the precision of the variable resolution process by ensuring the correct variable is identified and updated.
* Refactor Elsa API client to use API key authentication
The Elsa API client configuration has been refactored to use API key for authentication instead of HTTP handlers. Besides, the configuration method name was changed to 'AddElsaApiKeyClient' and its parameters were simplified for ease of use. Object 'ElsaClientBuilderOptions' has also been extended with additional properties for further customization.
* Add workflow result variable to context scope
In the ExpressionExecutionContextExtensions module, an additional check and yield operation has been implemented. This allows the inclusion of the workflow result variable, if it exists, to the current context scope.
* Refactor code by renaming and moving classes
Renamed 'VehiculeActivity', 'VehiculeUIHandler' to 'VehicleActivity', 'VehicleUIHandler' and moved them to their separate files. A debouncer was added to InputsTab in the WorkflowDefinitionEditor to limit the rate of firing refresh requests. Optimized codes by reducing unnecessary lines and improved consistency in the 'Program.cs' file.
* Add sample CustomUIHandler (#4729)
* add sample CustomUIHandler
* Refactor code by renaming and moving classes
Renamed 'VehiculeActivity', 'VehiculeUIHandler' to 'VehicleActivity', 'VehicleUIHandler' and moved them to their separate files. A debouncer was added to InputsTab in the WorkflowDefinitionEditor to limit the rate of firing refresh requests. Optimized codes by reducing unnecessary lines and improved consistency in the 'Program.cs' file.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Update Elsa.Studio packages and modify authentication setup
The Elsa.Studio packages have been updated to version "3.0.0-preview.177" from "3.0.0-preview.174" in several project files. Additionally, in the "Program.cs" of ElsaStudioWebAssembly, the way the authentication handler is set up for the remote backend has been simplified and made more straightforward.
* Add System.Runtime to CSharpOptions
The System.Runtime assembly and namespace has been added to CSharpOptions. This extends the functionality capabilities within the Elsa.CSharp module by providing access to the Guid class and its related methods and properties.
* Improve handling of non-HTTP context in HttpEndpoint
Updated the HttpEndpoint class to handle non-HTTP contexts better. Instead of throwing an exception when it finds itself in a non-HTTP context, it now creates a bookmark that allows the invoker to save the state and resume execution from there. A callback has also been added to the bookmarks creation process to prepare for resumption actions.
* Add non-generic variable accessor method
Added a non-generic version of the GetVariable method to the ExecutionContextProxy and GenerateWorkflowVariableAccessors classes in Elsa.CSharp module. Also, extended the CSharpOptions class to include additional namespaces and assemblies related to System.Text.Json. These adjustments provide a more flexible way to access workflow variables and extend the usability of JSON serialization within workflows.
* Add UIHint for FlowJoin activity
The FlowJoin activity's join mode now includes a UIHint, which indicates its input is a dropdown. This improves user interface interaction by allowing the selection of join mode from a dropdown menu rather than manual input.
* Add Parser for Form data 'application/x-www-form-urlencoded' (#4733)
* Update version naming in GitHub Actions
The convention for naming versions in GitHub Actions was modified. Previously, all tags were assigned just a sequential version, even if they were already marked as a release by a tag. Now, if they are tagged and marked as a published release, they use the tag as the version. The change should provide more accurate version information.
* Fix conditional formatting in GitHub workflow
A change has been made to correct the formatting in the conditional statement within the GitHub workflow file. This rectification ensures the proper assignment of the VERSION variable when a new release is published, through proper syntax adherence.
* Refactor variable names and update notification strategy
The variable names '_hosted' and '_backgroundEventService' in ServiceBusTests class have been refactored for clarity. They have been changed to '_backgroundCommandSenderHostedService' and '_backgroundEventPublisherHostedService' respectively to accurately depict the services they are hosting. Also, the notification strategy in the 'BackgroundEventPublisherHostedService' was changed from 'Background' to 'Sequential', fixing the process of sending notifications.
---------
Co-authored-by: Jean-Baptiste Dalle <jean-baptiste.dalle@stereograph.fr>
Co-authored-by: Vincent Doreau <vincent.doreau@stereograph.fr>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: zergmk2 <zergmk2@users.noreply.github.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
Co-authored-by: jdevillard <djay93@hotmail.com>
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
* Update service lifetimes and use IServiceScopeFactory for runtime activities
This commit introduces several modifications targeting the adjustment of service lifetimes. Classes that were previously instantiated as Scoped are changed to Singletons, and vice versa. Furthermore, it employs IServiceScopeFactory to resolve services required for runtime activities. This improves the application's infrastructure by ensuring more efficient service lifetimes and optimizing the runtime resource allocation.
---------
Co-authored-by: jeanbaptistedalle <jean-baptiste.dalle@laposte.net>
Co-authored-by: Jean-Baptiste Dalle <jean-baptiste.dalle@stereograph.fr>
Co-authored-by: Vincent Doreau <vincent.doreau@stereograph.fr>
Co-authored-by: zergmk2 <zergmk2@users.noreply.github.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
Co-authored-by: jdevillard <djay93@hotmail.com>
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
2024-01-02 13:52:53 +00:00
|
|
|
root = true
|
2025-01-09 09:27:55 +00:00
|
|
|
# Remove the line below if you want to inherit .editorconfig settings from higher directories
|
Merge scope change into main (#4738)
* Feature/change singleton to scope (#4635)
* feat(scoped): move dependencies to scoped instead of singleton if possible.
* fix(scoped): Timer and LiveTest
* fix(scoped): change scope of python and csharp features
* fix(scoped): remove FireAndForgetStrategy and replace if by BackgroundStrategy
* fix(scoped): add .editorconfig to avoid changing the sort order of using (system.* first) and fix the scope in BackgroundEventPublisher
* Update title in README.md
The README.md file has been updated to reflect the new version of Elsa - Elsa 3.0.
* Remove npm-packages workflow, adjust branch triggers in workflows
The npm-packages.yml workflow has been removed. The branch triggers in the workflows npm-packages.yml, packages.yml, and all-in-one-web.yml have been changed from 'v3' to 'main'. An unnecessary reference to the deleted workflow file npm-packages.yml is also removed from Elsa.sln.
* Remove obsolete files from designer packages
Numerous unused and obsolete files have been removed from various designer packages including angular-workspace, elsa-workflows-designer, react-workspace, and others. This cleanup enhances the maintainability of the project by eliminating unnecessary files and reducing clutter.
* Add badges to README.md
The README.md file has been updated to include badges for packages, continuous delivery, and discussions related to Elsa workflows. These badges provide quick access to key information and resources like Nuget, npm, GitHub Actions, feedz.io, Docker, Discord, Stack Overflow, and subreddit subscribers.
* Update README with enhanced instructions for Elsa server and studio
The README updates include specific instructions for running the Elsa server on port 5001 and the Elsa studio application on port 6001. These enhanced guidelines provide comprehensive steps for configuring the applications regarding authentication, module usage, and use of API endpoints.
* Add IsWorkflowDefinitionActivity method to ActivityExtensions
A new method, GetIsWorkflowDefinitionActivity, has been added to the ActivityExtensions class. This method checks a given JsonObject representing an activity to determine if it's a workflow definition activity. It returns true if the activity indeed is; otherwise, it returns false.
* Refactor MassTransit & AzureServiceBus configuration and delete unnecessary options
AzureServiceBusOption.cs and RabbitMqOptions.cs files were removed as they're no longer needed. The system now defers the configuration of MassTransit and AzureServiceBus to the application layer (Program.cs). The configuration for PrefetchCount is also allowed at the transport-level. A new abstraction, ConsumerTypeDefinition, collects all the consumer types with their respective definitions if provided. Adjustments have been made in related extension methods and classes to reflect these changes.
* Enhance configuration options for MassTransit
This commit enhances the configuration options for the MassTransit integration, providing additional settings for both Azure Service Bus and RabbitMq. It also refines the MassTransit workflow dispatcher configuration by allowing for custom dispatcher options. A default RabbitMq connection string has been added to the appsettings.json.
* Renamed AI file
* Update Elsa.Studio package versions
The package references for Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm in Elsa.AllInOne.Web and ElsaStudioWebAssembly projects were updated. The version has been changed from 3.0.0-preview.160 to 3.0.0-preview.164 to incorporate the latest features and bug fixes.
* Reorganize README and add Docker instructions
The README file was reorganized to make it more readable by grouping related badges together. Additionally, instructions on how to start the Elsa Docker container were appended for users who want to quickly try out the Elsa Studio and Elsa Server.
* Update description in README.md
The current diff modifies the description of the Docker image in the README file. The revised description consolidates information about the image, its reference ASP.NET application nature, and its non-production intention into a single, more succinct sentence.
* Add tests for implicit joins and fix duplicate activity scheduling
This commit includes new integration tests for implicit join scenarios. The tests ensure that join and parallel join activities execute correctly and complete as expected. Additionally, a change has been made to the workflow execution context to prevent duplicate activity scheduling. Now, aside from checking if the activity is already scheduled, it also checks if the activity is scheduled for the specified owner.
Fixes #4703
* Add ExpressionEvaluatorOptions to JavaScriptEvaluator
The JavaScriptEvaluator now accepts an options parameter of type ExpressionEvaluatorOptions. This allows adding custom arguments to the evaluation context. An 'Empty' static instance of ExpressionEvaluatorOptions is added for convenience. Additionally, the usage of MassTransitAzureServiceBus in Program.cs is turned off by setting the flag to 'false'.
* Update README to add access information when user tried to run elsa with docker (#4708)
* [no ci] add link to Elsa 2 in README
* Remove Console and ASP.NET examples, simplify README.md
Simplified README.md by removing in-depth Console and ASP.NET Core examples, as well as mentions about building from source, serving overall clarity and readability. Added descriptions for coded and visual workflow design possibilities.
* Implement batch processing in BulkDispatchWorkflows
The changes introduce a batch processing mechanism in the BulkDispatchWorkflows activity. Previously, each workflow was dispatched individually. Now, the process groups the workflows in batches, processes each batch concurrently, and handles errors. This change improves performance, particularly for large data sources.
* Refactor workflow methods for async execution
Modified methods in the WorkflowInstance.cs to implement re-entrant approach for asynchronous execution. This is achieved by replacing 'await' with task-based calls passed through the Context.ReenterAfter method, providing more efficient non-blocking operations. Minor changes were also made in ClusterExtensions.cs and ProtoActorWorkflowRuntime.cs, including code clean up and slight modifications to maintain consistency.
* Refactor background activities scheduling
Background activities scheduling was moved to its own middleware where the actual scheduling happens instead of in the invoking middleware. Removed ScheduleBackgroundActivities.cs handler and added ScheduleBackgroundActivitiesMiddleware.cs instead. As a part of this change, restructured BackgroundActivityInvokerMiddleware to BackgroundActivityCollectorMiddleware, and updated all relevant references.
Minor modifications to a few other files include changes in their package dependencies and activity kind settings.
* Change ActivityKind from Job to Task in BulkDispatchWorkflows
The ActivityKind property in BulkDispatchWorkflows class has been changed from Job to Task. This updates the type of activity associated with the BulkDispatchWorkflows process within the Elsa workflow runtime module.
* Update BulkDispatchWorkflows activity
The BulkDispatchWorkflows.cs activity in Elsa.Workflows.Runtime module has been updated with some key changes: Added detailed description to the input element, introduced the dispatchedInstancesCount to accurately track the number of instances dispatched, and removed some unnecessary white spaces for improved readability.
* Add methods to handle activity run asynchronously flag
New methods have been added to handle the custom property 'runAsynchronously' on a JsonObject activity. These methods will help in getting and setting a value that indicates whether a specified activity can trigger a workflow asynchronously. This additional level of control can enhance workflow execution based on specific requirements.
* Add 'Persister' to UserDictionary in DotSettings
The new dictionary entry for 'Persister' has been added to Elsa.sln.DotSettings. This expands the vocabulary of the solution's user dictionary and ensures that 'Persister' is recognized as a valid term within the project context.
* Add Bookmark Persister and Bookmark Updater
The code introduces BookmarkPersister for processing bookmarks as part of the workflow runtime. This refactoring improves readability and maintainability by separating the bookmark persisting logic from the PersistBookmarkMiddleware class. A new class, BookmarkUpdater, is also added to handle updating of bookmarks. Changes also include adjustments to several other classes for improved functionality and code consistency.
* Add bookmarks processing to DefaultBackgroundActivityInvoker
The code addition includes two dependencies, IBookmarksPersister and IWorkflowStateExtractor, in the DefaultBackgroundActivityInvoker service. With these changes, during the workflow execution phase, bookmarks are captured and processed for any state changes. These modifications provide more control and efficiency over handling workflow states during the system's background operations.
* Update workflow handling and simplify codebase
Refactored the workflow handling logic and simplified numerous components in the codebase. Major changes include the enhancement of the Workflow Runtime handler, altering the broadcast and deliver functions in the Default Workflow Inbox, and the removal of unnecessary details in the Workflow Runtime feature. Also, unnecessary services and requests were removed for better code efficiency and readability.
* Add conversion support for long type in ObjectConverter
The ObjectConverter file has been updated to support conversion of 'long' type. This is done by adding an additional conditional statement for checking the underlying source type for 'long', then returning the converted value.
* Add 'Noop' method to WorkflowExecutionContext
A Noop method has been added to the WorkflowExecutionContext, and is now assigned to the ExecuteDelegate field when no resumption point is specified. The change, will prevent the invocation of the regular "ExecuteAsync" method, closing the activity without additional operations.
* Add AutoComplete option to workflow bookmarks
The AutoComplete option has been added to the workflow bookmarks, which determines whether the activity should automatically be completed if no callback is specified. This change improves the flexibility of bookmark creation and impacts various workflow elements and procedures. The corresponding adjustments have been made at functions where bookmarks are used or created.
* Refactor object initialization in ActivityExecutionContext
Refactoring was performed in the ActivityExecutionContext class to use object initializers for readability and clarity. This modification mainly targets the CreateBookmark and ScheduleActivityAsync methods, making their code more explicit and thus easier to understand.
* Refactor code for readability and improved logging
Code in several activity files and Worker.cs that involve creating bookmarks and handling messages received was refactored to improve readability and clarity. The instantiated "CreateBookmarkArgs" parameter was split into its individual arguments for improved readability. Logging in the Worker.cs file was also fine-tuned, with explicit count of workflows triggered by service bus messages being included in the debug log.
* Refactor code structure for ServiceBus Integration tests
Refactored the ServiceBus Integration tests for improved readability and maintenance. The changes included reducing the number of lines by removing unnecessary curly braces, removing unnecessary use of 'this' qualifier, replacing null checks with null-conditional operators, and organizing various code blocks for better understanding.
* Remove specific activity instance bookmarks
The change clears specific activity instance bookmarks in the context from the WorkflowExecutionContext. This is an extra step in the process of clearing bookmarks, which assists in managing and cleaning up workflow state effectively.
* Update Elsa.Studio.Login.BlazorWasm version
The version number of Elsa.Studio.Login.BlazorWasm has been updated in the Elsa.AllInOne.Web.csproj file. This change reflects the newest release, moving from version 3.0.0-preview.164 to 3.0.0-preview.167.
* Update artwork
* Implement pagination for activity descriptor fetching
Updated the WorkflowDefinitionActivityProvider code to fetch activity descriptors in a paginated manner. This change will be useful to avoid overloading system resources when interacting with large amounts of data. It retrieves a limited number of descriptors per request, looping until all are fetched.
Closes #4689
* Refactor task payload extraction and update workflow builder
Modified the way task payload is extracted in the OrderFoodTaskHandler.cs for more robustness. The input parameter of the workflow builder in the HungryWorkflow.cs file has also been refactored for efficiency. Making these tweaks streamlines management of values within the tasks.
* Update localhost port for workflow sample
The localhost port for the Elsa.Samples.AspNet.RunTaskIntegration has been updated from 7211 to 5001 in both the run-workflow.http and launchSettings.json files. This adjustment ensures that the workflow sample correctly points to the new localhost port, maintaining synchronization within the application.
* Refactor ExpressionExecutionContextExtensions module
Modified the GetInput methods to consider the case where the method is called within a composite activity, ensuring that only local variables have precedence over workflow input when executing within a composite activity.
* Feature HTTP Activity : Allow adding Authorization Header without validation (#4721)
* Add capability to add Authorization Header without validation
* Refactor authorization header handling in HTTP requests
This commit simplifies the syntax for input attributes in the SendHttpRequestBase.cs module. It also renames the boolean value `AddAuthorizatonHeaderWithoutValidation` to `DisableAuthorizationHeaderValidation` for more clarity. This change improves code readability and understanding in relation to handling authorization headers in HTTP requests.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Add a more generic UIHandler to customize how inputAttributes can be handle by UI (#4688)
* add a more generic UIHandler to customize how inputAttributes can be handle by the ui
* Add IPropertyUIHandlerResolver and update PropertyUIHandlerResolver
Introduced a new interface, IPropertyUIHandlerResolver, to resolve UI options for a property. Refactored PropertyUIHandlerResolver to implement this interface and removed the unnecessary partial class structure. Also, cleaned up some unnecessary usings in various files for better code organization.
* Refactor variable name and description in InputDescriptor
The 'uISpecifications' variable in the InputDescriptor model is renamed to 'uiSpecifications' for better readability. Additionally, the associated comment was revised to explain that the dictionary is used by the UI.
* "Refactor codebase for improved organization and cleaner architecture"
The codebase has been significantly refactored, moving several classes to more appropriate namespaces for improved organization and cleaner architecture. This includes shifting UI hint handlers, activities, and memory-related components, amongst others. The changes should improve code readability and maintainability, but as this is a broad refactoring effort, thorough regression testing is advised.
* Add CheckList UIHint with associated handler and provider
This update introduces a new UIHint called CheckList to the Elsa.Workflows.Core. This includes the necessary handler and provider classes. The handler is registered in the WorkflowsFeature.cs, and the CheckList UIHint key has been added to the InputUIHints.cs. Various associated files have been created in both the Elsa.Api.Client and Elsa.Workflows.Core project to support this new UIHint.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Update GitHub actions for packages publishing
This update changes the trigger for the package publishing action to only 'published' releases and prereleases. It also segregates the publishing mechanism into two separate actions: one for publishing preview packages to nuget.org, and another for publishing release packages. This change provides better clarity and control over the publishing process.
* Update FastEndpoints package and enable JWT Bearer Auth
The FastEndpoints package was updated to '5.20.1.7-beta' from '5.20.0-rc1'. Enabling JWT Bearer Authentication was also set from 'false' to 'true' in the SwaggerExtensions file. Removed conditions that were limiting the addition and usage of Swagger to .NET 6.0 or 7.0, which allows the Swagger to be used in any environment.
* Refactor input output assignment and JSON converter
The code has been updated to provide clear and meaningful block reference names using the Humanizer library in the IdentityGraphService. The redundancy in assigning input/output Id's in both IdentityGraphService and InputJsonConverter has also been removed, resulting in cleaner, less convoluted code.
* Enhanced script language support in Elsa.AllInOne.Web
This update introduces expanded language support in Elsa.AllInOne.Web. The changes allow CLR access in JavaScript, and also introduce the ability to use both C# and Python. The changes also include adding project references for the C# and Python modules.
* Add logging to PythonGlobalInterpreterManager
Implemented logging in the PythonGlobalInterpreterManager class to ensure visibility during Python engine initialization and shutdown. These changes are important for spotting errors, troubleshooting issues, and understanding potential failures in Python engine initialization.
* Refactor project structure and Docker configurations
The changes included in this commit are made to refactor the project structure and Docker configurations. Previously, the application was structured around the AllInOneWeb solution, but it has been split into Server.Web and ServerAndStudio.Web solutions for better separation of concerns. Additionally, the Docker configurations have been updated to reflect the new structure, which should streamline the build and deployment process.
* Add GitHub Actions workflows for Elsa Docker images
This commit introduces two new GitHub Actions workflows: one for building and deploying the Elsa Server + Studio Docker image, and another for the Elsa Server Docker image. Both processes automate the build and push actions to Docker Hub using the latest ubuntu version and buildx for multi-platform support.
* Update Dockerfiles and add Python 3.11
Working directories in both ElsaServer.Dockerfile and ElsaServerAndStudio.Dockerfile have been updated for better consistency. Additionally, Python 3.11 has been installed in the ElsaServer.Dockerfile, accompanied by relevant environment variables and symbolic links to improve interoperability.
* Update Dockerfiles for Python 3.11 installation
Added lines in Dockerfiles to install Python 3.11 and set the PYTHONNET_PYDLL environment variable. This enhancement helps to ensure compatibility with recent Python updates and improves general performance.
* Add Elsa.Studio.Web project to the solution
A new project, Elsa.Studio.Web, was added to the solution which included adding appropriate configuration files, host pages, project settings and important dependencies. Necessary adjustments were also made in Elsa.ServerAndStudio.Web.csproj to match with the latest updates.
* Add Docker build script for Elsa Studio
This commit introduces a Dockerfile for the Elsa Studio application and a corresponding GitHub workflow for building and deploying the Docker image. These make it possible to automatically build and deploy Elsa Studio as a Docker image.
* Update Elsa.Studio package versions
Updated the version of Elsa.Studio and Elsa.Studio.Login.BlazorWasm from '3.0.0-preview.169' to '3.0.0-preview.170' in Elsa.Studio.Web and Elsa.ServerAndStudio.Web projects. This is to keep the dependencies up to date and leverage any enhancements or bug fixes in the new version.
* Update Elsa.Studio packages to version 3.0.0-preview.171
The Elsa.Studio and Elsa.Studio.Login.BlazorWasm packages are updated from version 3.0.0-preview.170 to 3.0.0-preview.171 in both Elsa.Studio.Web and Elsa.ServerAndStudio.Web projects. The updated packages include satisfying the latest enhancements and bug fixes.
* Update Elsa.Studio package versions
The Elsa.Studio package versions in ElsaStudioWebAssembly project have been updated from "3.0.0-preview.164" to "3.0.0-preview.171". The packages include Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm.
* Add CodeEditorOptions, EditorHeight, and MultiLineOptions classes
This commit introduces three new classes to the CodeEditor namespace. CodeEditorOptions provides various configuration options for the code editor while EditorHeight defines available height options. MultiLineOptions is specifically built for managing multi-line editor settings.
* Update Elsa.Studio packages to version 3.0.0-preview.172
The packages Elsa.Studio, Elsa.Studio.Login.BlazorWasm and Elsa.Studio.Core.BlazorWasm have been updated to version 3.0.0-preview.172 in the Elsa.Studio.Web, Elsa.ServerAndStudio.Web, and ElsaStudioWebAssembly projects.
* Add non-generic GetVariable method and Python accessors
A non-generic version of GetVariable method has been added to the ExecutionContextProxy.cs, allowing direct access to variables without specifying a type. To leverage this, Python accessors for getting and setting workflow variables have been added to GenerateWorkflowVariableAccessors.cs. This enhances the interaction between the Python scripts and the context variables.
* Add UI hints to input fields in workflow core modules
Changed a number of instances in both activities and UI Hints classes across multiple modules in the workflow core to utilize UIHints. The UI hint "DropDown" has been added to relevant input fields to improve the user interface. Special handling for Enum properties in the drop-down options provider has also been created.
* Update HTTP endpoint authorization handler
The default authorization handler for HTTP endpoints is now the AuthenticationBasedHttpEndpointAuthorizationHandler instead of the AllowAnonymousHttpEndpointAuthorizationHandler. The configuration was updated in HttpFeature.cs and the override in Program.cs was removed. This provides more security to HTTP endpoints by requiring authentication.
* Add JSON editor UI hint to HTTP activities
This commit introduces a JSON editor UI hint to HTTP activities within Elsa Workflow. It includes creating new classes for a JSON editor options provider and a handler for this UI hint. Also, these additions are registered within the Elsa Workflow. The hint is applied to the 'RequestHeaders' and 'ResponseHeaders' input fields found in HTTP-related activity classes.
* Add UI hints for HTTP endpoint and single line fields
Introduced HttpEndpointPathUIHandler to provide additional UI options for the Path input field in the HTTP Endpoint activity. This commits also adds SingleLineProps to offer more options for SingleLine input fields across different modules. The implementation improves UI component interactions.
* Update Elsa.Studio packages to version 3.0.0-preview.174
The Elsa.Studio, Elsa.Studio.Login.BlazorWasm, and Elsa.Studio.Core.BlazorWasm packages have been updated to version 3.0.0-preview.174 across multiple projects. The updated packages should provide the latest functionalities and fixes from the Elsa framework.
* Add API key authentication for Elsa client
Introduced an `ApiKeyHttpMessageHandler` to use an API key as the authorization header for Elsa API client. This ensures secure interaction with the Elsa server. Also made updates to the `ElsaClientOptions` class to include the API key. An `AddElsaClient` method is added with the API key parameter in `DependencyInjectionExtensions` class for convenience.
* add sample CustomUIHandler
* Fix Httpendpoint Path
* Refactor parameter in AddElsaClient method
The parameter "configureOptions" in the AddElsaClient method has been renamed and refactored to allow direct HTTP client configuration. This change enables the actions for configuring the HTTP client to be passed directly, providing greater flexibility for customization.
* Add extension method to get workflow instance ID
This adds a new extension method in HttpResponseMessageExtensions class which retrieves the workflow instance ID from the response. It also includes a HeaderNames class to maintain the consistency of header names used by the Elsa API.
* Remove ElsaClient and related interfaces
Files ElsaClient.cs, IElsaClient.cs and IElsaClientFactory.cs have been deleted from the Elsa.Api.Client project. The commit also includes an update in the DependencyInjectionExtensions.cs file where IElsaClient service registration is removed, reflecting these changes.
* Add condition to return json as string
A condition has been added to check if the returnType is of type 'string'. If so, the json is returned as string directly without converting. This is particularly useful to avoid unnecessary conversion when the returnType is already a string.
* Disable PythonEngine Shutdown to prevent deadlock
* Improve variable resolution in workflow activity
Added a reference to Variable.Id in the SetVariable activity within the Elsa.Workflows.Core module to ensure the correct variable scope is utilized. This change enhances the precision of the variable resolution process by ensuring the correct variable is identified and updated.
* Refactor Elsa API client to use API key authentication
The Elsa API client configuration has been refactored to use API key for authentication instead of HTTP handlers. Besides, the configuration method name was changed to 'AddElsaApiKeyClient' and its parameters were simplified for ease of use. Object 'ElsaClientBuilderOptions' has also been extended with additional properties for further customization.
* Add workflow result variable to context scope
In the ExpressionExecutionContextExtensions module, an additional check and yield operation has been implemented. This allows the inclusion of the workflow result variable, if it exists, to the current context scope.
* Refactor code by renaming and moving classes
Renamed 'VehiculeActivity', 'VehiculeUIHandler' to 'VehicleActivity', 'VehicleUIHandler' and moved them to their separate files. A debouncer was added to InputsTab in the WorkflowDefinitionEditor to limit the rate of firing refresh requests. Optimized codes by reducing unnecessary lines and improved consistency in the 'Program.cs' file.
* Add sample CustomUIHandler (#4729)
* add sample CustomUIHandler
* Refactor code by renaming and moving classes
Renamed 'VehiculeActivity', 'VehiculeUIHandler' to 'VehicleActivity', 'VehicleUIHandler' and moved them to their separate files. A debouncer was added to InputsTab in the WorkflowDefinitionEditor to limit the rate of firing refresh requests. Optimized codes by reducing unnecessary lines and improved consistency in the 'Program.cs' file.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Update Elsa.Studio packages and modify authentication setup
The Elsa.Studio packages have been updated to version "3.0.0-preview.177" from "3.0.0-preview.174" in several project files. Additionally, in the "Program.cs" of ElsaStudioWebAssembly, the way the authentication handler is set up for the remote backend has been simplified and made more straightforward.
* Add System.Runtime to CSharpOptions
The System.Runtime assembly and namespace has been added to CSharpOptions. This extends the functionality capabilities within the Elsa.CSharp module by providing access to the Guid class and its related methods and properties.
* Improve handling of non-HTTP context in HttpEndpoint
Updated the HttpEndpoint class to handle non-HTTP contexts better. Instead of throwing an exception when it finds itself in a non-HTTP context, it now creates a bookmark that allows the invoker to save the state and resume execution from there. A callback has also been added to the bookmarks creation process to prepare for resumption actions.
* Add non-generic variable accessor method
Added a non-generic version of the GetVariable method to the ExecutionContextProxy and GenerateWorkflowVariableAccessors classes in Elsa.CSharp module. Also, extended the CSharpOptions class to include additional namespaces and assemblies related to System.Text.Json. These adjustments provide a more flexible way to access workflow variables and extend the usability of JSON serialization within workflows.
* Add UIHint for FlowJoin activity
The FlowJoin activity's join mode now includes a UIHint, which indicates its input is a dropdown. This improves user interface interaction by allowing the selection of join mode from a dropdown menu rather than manual input.
* Add Parser for Form data 'application/x-www-form-urlencoded' (#4733)
* Update version naming in GitHub Actions
The convention for naming versions in GitHub Actions was modified. Previously, all tags were assigned just a sequential version, even if they were already marked as a release by a tag. Now, if they are tagged and marked as a published release, they use the tag as the version. The change should provide more accurate version information.
* Fix conditional formatting in GitHub workflow
A change has been made to correct the formatting in the conditional statement within the GitHub workflow file. This rectification ensures the proper assignment of the VERSION variable when a new release is published, through proper syntax adherence.
* Refactor variable names and update notification strategy
The variable names '_hosted' and '_backgroundEventService' in ServiceBusTests class have been refactored for clarity. They have been changed to '_backgroundCommandSenderHostedService' and '_backgroundEventPublisherHostedService' respectively to accurately depict the services they are hosting. Also, the notification strategy in the 'BackgroundEventPublisherHostedService' was changed from 'Background' to 'Sequential', fixing the process of sending notifications.
---------
Co-authored-by: Jean-Baptiste Dalle <jean-baptiste.dalle@stereograph.fr>
Co-authored-by: Vincent Doreau <vincent.doreau@stereograph.fr>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: zergmk2 <zergmk2@users.noreply.github.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
Co-authored-by: jdevillard <djay93@hotmail.com>
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
* Update service lifetimes and use IServiceScopeFactory for runtime activities
This commit introduces several modifications targeting the adjustment of service lifetimes. Classes that were previously instantiated as Scoped are changed to Singletons, and vice versa. Furthermore, it employs IServiceScopeFactory to resolve services required for runtime activities. This improves the application's infrastructure by ensuring more efficient service lifetimes and optimizing the runtime resource allocation.
---------
Co-authored-by: jeanbaptistedalle <jean-baptiste.dalle@laposte.net>
Co-authored-by: Jean-Baptiste Dalle <jean-baptiste.dalle@stereograph.fr>
Co-authored-by: Vincent Doreau <vincent.doreau@stereograph.fr>
Co-authored-by: zergmk2 <zergmk2@users.noreply.github.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
Co-authored-by: jdevillard <djay93@hotmail.com>
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
2024-01-02 13:52:53 +00:00
|
|
|
|
|
|
|
|
# C# files
|
|
|
|
|
[*.cs]
|
|
|
|
|
|
|
|
|
|
#### Core EditorConfig Options ####
|
|
|
|
|
|
|
|
|
|
# Indentation and spacing
|
|
|
|
|
indent_size = 4
|
|
|
|
|
indent_style = space
|
|
|
|
|
tab_width = 4
|
|
|
|
|
|
|
|
|
|
# New line preferences
|
|
|
|
|
end_of_line = crlf
|
|
|
|
|
insert_final_newline = false
|
Lazy loading of subgraphs (#5643)
* Refactor activity serialization process
Refactored the activity serialization process in Elsa workflow API. The changes include addition, modification and deletion of code blocks across various files to accommodate the restructuring. The changes focus primarily on the handling of composite root activities and their serialization. The utility of configuration options for serializer is also implemented.
* Stash
* Add IgnoreChildActivitiesConverter and improve activity JSON conversion
A new JSON converter, IgnoreChildActivitiesConverter, has been introduced to handle specific serialization scenarios. On top of this, improvements have been made to the existing ActivityJsonConverter. This includes more robust handling of synthetic properties and the ability to ignore child activities during serialization. In DiagramDesignerWrapper, an addition has been made to facilitate the handling of embedded activities.
* "Implement activity port tracking in workflow system"
Modified several components of the workflow system to include activity port tracking for better visibility and control over workflow structures. In addition, unnecessary files were deleted, new ones were introduced, and changes were made to existing files to incorporate the new functionality. Notably, IActivityResolver interface now includes GetActivityPortsAsync method to allow retrieving activity ports. This enhances the ability to track actions in complex workflows.
* Add specialized converter check in activity serialization
The commit introduces a check for specialized JSON converters in two serialization methods inside `ActivityJsonConverter.cs` and `ActivityNodeConverter.cs`. If a specialized converter exists for a particular activity type, the serializer now uses it to serialize the activity, enhancing the serialization process's flexibility.
* Ignore serialization of ConfigureSerializerOptions
Added JsonIgnore attribute to the ConfigureSerializerOptions in the ActivityDescriptor class. This will prevent it from being included during the JSON serialization process, ensuring that it is not unnecessarily processed or exposed in serialized data formats.
* Refactor method to find WorkflowDefinition instead of WorkflowGraph
The method FindWorkflowGraphAsync was revised to find WorkflowDefinition rather than WorkflowGraph, reflecting its new purpose in the code. This change has also affected the related variables and logic where this function was called. The rationale for this revision is that the WorkflowGraph is a dynamic entity that should be computed at runtime, and hence cannot be reliably retrieved for static inspection.
* Update API endpoint and simplify request handling in workflow
The API endpoint for fetching workflow definitions graph has been changed from "/workflow-definitions/{definitionId}/graph" to "/workflow-definitions/subgraph/{id}". Similarly, the request handling has been simplified by removing version options and directly passing "Id" to the "FindWorkflowGraphAsync" method.
* Update import statements and remove unused dependencies
Some import/using statements have been adjusted to remove the 'Contracts' suffix in contexts where it's not necessary. A few unused dependencies have also been removed. These changes clean up the code and ensure proper functionality in the Elsa workflows system.
* Update .editorconfig settings
The .editorconfig settings have been revised to enforce inheritance of settings from higher directories. Additionally, the parameter 'file_header_template' has been removed. This update optimizes the configuration settings for better coding standards across C# files.
* Remove App_Data folder from Elsa.Server.Web.csproj
The App_Data folder reference has been removed from the Elsa.Server.Web project file. This change is included as the folder no longer seems necessary for the operation of the project.
* Remove unused namespace in ServiceProviderExtensions.cs
The Elsa.Workflows.Runtime.Options namespace, previously imported in the ServiceProviderExtensions file within the Elsa.Testing.Shared project, has been removed as it is not utilized. This cleanup enhances readability and maintains cleaner code.
* Implement GetActivityPortsAsync method in various classes
Added the implementation of GetActivityPortsAsync method in WorkplaceDefinitionActivityPortResolver, SendHttpRequestActivityPortResolver, OutboundActivityPortResolver, and SwitchActivityPortResolver classes. Changes also include adding inheritdoc comments for these methods, making GetActivityPortsInternal method private and static, and removing unneeded white spaces.
* Remove GetActivitiesAsync method from activity resolvers
The GetActivitiesAsync method has been removed from various activity resolver classes including WorkflowDefinitionActivityPortResolver, SendHttpRequestActivityPortResolver, OutboundActivityPortResolver, and SwitchActivityPortResolver. The corresponding interface IActivityResolver has also been updated to reflect this change. This simplifies the structure by focusing only on the activity ports.
* Simplify workflow definition serialization
Removed the cloning of serializer options and the exclusion of composite activities from being serialized in the workflow definition model. This simplification results in cleaner code with less redundancy and unnecessary operations.
* Refactor workflow definition endpoints, optimize response handling
Major refactor of workflow definition endpoints in the Elsa.Workflows.Api module. Unnecessary serialization processes have been removed. Response handling was also streamlined to use the SendOkAsync method, optimizing resource usage and increasing application performance. Commit also includes removal of some unused namespaces.
* Remove IncludeCompositeRoot property from Models
The IncludeCompositeRoot property has been removed from the Models in the GetByDefinitionId, GetById, and GetManyById endpoints. These changes simplify the code as the property was commented out and not used in current workflow logic.
* Simplify workflow definition publishing process
This commit simplifies the workflow definition publishing process in the Elsa.Workflows.Api module. The code associated with checking if a workflow definition is already published and publishing it if not has been reduced for increased readability and maintainability.
* Refactor code in workflow publish endpoint
Removed unused import for better code clarity and simplified variable declaration for publishing result. The refactoring is carried out to improve code readability and maintainability in the workflow definition publishing endpoint.
* Refactor ActivityPort in Elsa.Workflows module
This commit simplifies the code in the ActivityPort class, part of the Elsa.Workflows module. It includes a significant rework of the comments for better clarity and understanding. Effort has been made to make the code more readable and easier to maintain in this refactor.
* Refactor serialization methods and improve Synthetic Properties handling
This commit refactors the activity serialization methods and improves the handling of synthetic properties. The changes remove the IgnoreChildActivitiesConverter and move synthetic property writing to a separate helper class, SyntheticPropertiesWriter. Various refinements have been made to different converter classes to better handle activity serialization. Furthermore, a function's name was improved from "FindWorkflowGraphAsync" to "GetWorkflowDefinitionAsync" to more accurately reflects its purpose.
* Add ActivityWriter to help serialize workflow activities
This commit introduces a new class ActivityWriter, that handles the serialization of workflow activities to JSON. Other classes such as ActivityNodeConverter and ActivityJsonConverter have been refactored to utilize this new helper. The codebase is now more DRY, avoids duplicate code and increases code maintainability.
* Refactor Json serialization for ignoring specialized converters
Removed 'IActivityRegistry' from 'JsonIgnoreCompositeRootConverter'. Instead, added an 'ignoreSpecializedConverters' argument to the 'WriteActivity' method in 'ActivityWriter'. This adjustment facilitates managing specialized converter behavior more efficiently during JSON serialization.
* Update ActivityNode serialization description
The comments for the ActivityNodeConverter class have been modified to clarify the serialization process. It now explicitly states that it includes descendant nodes based on the specified depth rather than just immediate child nodes. The parameter 'depth' description has been updated to 'the number of levels of descendants to include'.
* Refine workflow serializer and update activity writer parameters
The WorkflowSerializer clone operation has been simplified to directly call GetOptions from the API Serializer. Furthermore, an unnecessary comment was removed. In the ActivityWriter, an additional parameter was introduced for controlling whether to ignore the availability of converters that can handle IActivity objects. A superfluous front slash was removed from the class description comment.
* Add WorkflowJsonStructureTests and related JSON files
This commit introduces the WorkflowJsonStructureTests class which includes tests for the structure of the workflow definition in JSON format. In addition, main.json and sub.json files, containing mock data for testing, were added to the `WorkflowJsonStructures` scenario within the Elsa Workflows Component Tests. Updates to the project file ensure these new files are included correctly.
* Update WorkflowJsonStructureTests with subgraph test
This commit introduces a new test case named 'Requesting_Subgraph_Returns_ExpectedSubgraph' in the WorkflowJsonStructureTests file. It also refactors 'Workflow_ContainingWorkflowActivity_ShouldNotIncludeChildrenOfWorkflowActivity' test to make use of constants for IDs. These changes increase the coverage and maintainability of the code.
* Update max line length in .editorconfig
This commit increases the max line length to 420 characters in the .editorconfig. Additionally, it removes the redundant 'resharper_csharp_max_line_length' setting.
* Replace ActivityNodeConverter with RootActivityNodeConverter
The commit involves a change in serialization strategy for ActivityNode in the Elsa Workflows modules. The ActivityNodeConverter has been replaced with a RootActivityNodeConverter, which changes the approach from serializing the ActivityNode type and its descendants based on specified depth to serializing the ActivityNode type without its children, with activity children now serialized as properties. Corresponding alterations have also been made in the test cases.
* Remove IActivityRegistry parameter from classes
The IActivityRegistry parameter was removed from WorkflowDefinitionActivityProvider and JsonIgnoreCompositeRootConverterFactory classes, simplifying their constructors. This change also affected Elsa.Workflows.ComponentTests where the node access through "root" was adjusted for these updates.
2024-06-25 07:21:50 +00:00
|
|
|
max_line_length = 420
|
Merge scope change into main (#4738)
* Feature/change singleton to scope (#4635)
* feat(scoped): move dependencies to scoped instead of singleton if possible.
* fix(scoped): Timer and LiveTest
* fix(scoped): change scope of python and csharp features
* fix(scoped): remove FireAndForgetStrategy and replace if by BackgroundStrategy
* fix(scoped): add .editorconfig to avoid changing the sort order of using (system.* first) and fix the scope in BackgroundEventPublisher
* Update title in README.md
The README.md file has been updated to reflect the new version of Elsa - Elsa 3.0.
* Remove npm-packages workflow, adjust branch triggers in workflows
The npm-packages.yml workflow has been removed. The branch triggers in the workflows npm-packages.yml, packages.yml, and all-in-one-web.yml have been changed from 'v3' to 'main'. An unnecessary reference to the deleted workflow file npm-packages.yml is also removed from Elsa.sln.
* Remove obsolete files from designer packages
Numerous unused and obsolete files have been removed from various designer packages including angular-workspace, elsa-workflows-designer, react-workspace, and others. This cleanup enhances the maintainability of the project by eliminating unnecessary files and reducing clutter.
* Add badges to README.md
The README.md file has been updated to include badges for packages, continuous delivery, and discussions related to Elsa workflows. These badges provide quick access to key information and resources like Nuget, npm, GitHub Actions, feedz.io, Docker, Discord, Stack Overflow, and subreddit subscribers.
* Update README with enhanced instructions for Elsa server and studio
The README updates include specific instructions for running the Elsa server on port 5001 and the Elsa studio application on port 6001. These enhanced guidelines provide comprehensive steps for configuring the applications regarding authentication, module usage, and use of API endpoints.
* Add IsWorkflowDefinitionActivity method to ActivityExtensions
A new method, GetIsWorkflowDefinitionActivity, has been added to the ActivityExtensions class. This method checks a given JsonObject representing an activity to determine if it's a workflow definition activity. It returns true if the activity indeed is; otherwise, it returns false.
* Refactor MassTransit & AzureServiceBus configuration and delete unnecessary options
AzureServiceBusOption.cs and RabbitMqOptions.cs files were removed as they're no longer needed. The system now defers the configuration of MassTransit and AzureServiceBus to the application layer (Program.cs). The configuration for PrefetchCount is also allowed at the transport-level. A new abstraction, ConsumerTypeDefinition, collects all the consumer types with their respective definitions if provided. Adjustments have been made in related extension methods and classes to reflect these changes.
* Enhance configuration options for MassTransit
This commit enhances the configuration options for the MassTransit integration, providing additional settings for both Azure Service Bus and RabbitMq. It also refines the MassTransit workflow dispatcher configuration by allowing for custom dispatcher options. A default RabbitMq connection string has been added to the appsettings.json.
* Renamed AI file
* Update Elsa.Studio package versions
The package references for Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm in Elsa.AllInOne.Web and ElsaStudioWebAssembly projects were updated. The version has been changed from 3.0.0-preview.160 to 3.0.0-preview.164 to incorporate the latest features and bug fixes.
* Reorganize README and add Docker instructions
The README file was reorganized to make it more readable by grouping related badges together. Additionally, instructions on how to start the Elsa Docker container were appended for users who want to quickly try out the Elsa Studio and Elsa Server.
* Update description in README.md
The current diff modifies the description of the Docker image in the README file. The revised description consolidates information about the image, its reference ASP.NET application nature, and its non-production intention into a single, more succinct sentence.
* Add tests for implicit joins and fix duplicate activity scheduling
This commit includes new integration tests for implicit join scenarios. The tests ensure that join and parallel join activities execute correctly and complete as expected. Additionally, a change has been made to the workflow execution context to prevent duplicate activity scheduling. Now, aside from checking if the activity is already scheduled, it also checks if the activity is scheduled for the specified owner.
Fixes #4703
* Add ExpressionEvaluatorOptions to JavaScriptEvaluator
The JavaScriptEvaluator now accepts an options parameter of type ExpressionEvaluatorOptions. This allows adding custom arguments to the evaluation context. An 'Empty' static instance of ExpressionEvaluatorOptions is added for convenience. Additionally, the usage of MassTransitAzureServiceBus in Program.cs is turned off by setting the flag to 'false'.
* Update README to add access information when user tried to run elsa with docker (#4708)
* [no ci] add link to Elsa 2 in README
* Remove Console and ASP.NET examples, simplify README.md
Simplified README.md by removing in-depth Console and ASP.NET Core examples, as well as mentions about building from source, serving overall clarity and readability. Added descriptions for coded and visual workflow design possibilities.
* Implement batch processing in BulkDispatchWorkflows
The changes introduce a batch processing mechanism in the BulkDispatchWorkflows activity. Previously, each workflow was dispatched individually. Now, the process groups the workflows in batches, processes each batch concurrently, and handles errors. This change improves performance, particularly for large data sources.
* Refactor workflow methods for async execution
Modified methods in the WorkflowInstance.cs to implement re-entrant approach for asynchronous execution. This is achieved by replacing 'await' with task-based calls passed through the Context.ReenterAfter method, providing more efficient non-blocking operations. Minor changes were also made in ClusterExtensions.cs and ProtoActorWorkflowRuntime.cs, including code clean up and slight modifications to maintain consistency.
* Refactor background activities scheduling
Background activities scheduling was moved to its own middleware where the actual scheduling happens instead of in the invoking middleware. Removed ScheduleBackgroundActivities.cs handler and added ScheduleBackgroundActivitiesMiddleware.cs instead. As a part of this change, restructured BackgroundActivityInvokerMiddleware to BackgroundActivityCollectorMiddleware, and updated all relevant references.
Minor modifications to a few other files include changes in their package dependencies and activity kind settings.
* Change ActivityKind from Job to Task in BulkDispatchWorkflows
The ActivityKind property in BulkDispatchWorkflows class has been changed from Job to Task. This updates the type of activity associated with the BulkDispatchWorkflows process within the Elsa workflow runtime module.
* Update BulkDispatchWorkflows activity
The BulkDispatchWorkflows.cs activity in Elsa.Workflows.Runtime module has been updated with some key changes: Added detailed description to the input element, introduced the dispatchedInstancesCount to accurately track the number of instances dispatched, and removed some unnecessary white spaces for improved readability.
* Add methods to handle activity run asynchronously flag
New methods have been added to handle the custom property 'runAsynchronously' on a JsonObject activity. These methods will help in getting and setting a value that indicates whether a specified activity can trigger a workflow asynchronously. This additional level of control can enhance workflow execution based on specific requirements.
* Add 'Persister' to UserDictionary in DotSettings
The new dictionary entry for 'Persister' has been added to Elsa.sln.DotSettings. This expands the vocabulary of the solution's user dictionary and ensures that 'Persister' is recognized as a valid term within the project context.
* Add Bookmark Persister and Bookmark Updater
The code introduces BookmarkPersister for processing bookmarks as part of the workflow runtime. This refactoring improves readability and maintainability by separating the bookmark persisting logic from the PersistBookmarkMiddleware class. A new class, BookmarkUpdater, is also added to handle updating of bookmarks. Changes also include adjustments to several other classes for improved functionality and code consistency.
* Add bookmarks processing to DefaultBackgroundActivityInvoker
The code addition includes two dependencies, IBookmarksPersister and IWorkflowStateExtractor, in the DefaultBackgroundActivityInvoker service. With these changes, during the workflow execution phase, bookmarks are captured and processed for any state changes. These modifications provide more control and efficiency over handling workflow states during the system's background operations.
* Update workflow handling and simplify codebase
Refactored the workflow handling logic and simplified numerous components in the codebase. Major changes include the enhancement of the Workflow Runtime handler, altering the broadcast and deliver functions in the Default Workflow Inbox, and the removal of unnecessary details in the Workflow Runtime feature. Also, unnecessary services and requests were removed for better code efficiency and readability.
* Add conversion support for long type in ObjectConverter
The ObjectConverter file has been updated to support conversion of 'long' type. This is done by adding an additional conditional statement for checking the underlying source type for 'long', then returning the converted value.
* Add 'Noop' method to WorkflowExecutionContext
A Noop method has been added to the WorkflowExecutionContext, and is now assigned to the ExecuteDelegate field when no resumption point is specified. The change, will prevent the invocation of the regular "ExecuteAsync" method, closing the activity without additional operations.
* Add AutoComplete option to workflow bookmarks
The AutoComplete option has been added to the workflow bookmarks, which determines whether the activity should automatically be completed if no callback is specified. This change improves the flexibility of bookmark creation and impacts various workflow elements and procedures. The corresponding adjustments have been made at functions where bookmarks are used or created.
* Refactor object initialization in ActivityExecutionContext
Refactoring was performed in the ActivityExecutionContext class to use object initializers for readability and clarity. This modification mainly targets the CreateBookmark and ScheduleActivityAsync methods, making their code more explicit and thus easier to understand.
* Refactor code for readability and improved logging
Code in several activity files and Worker.cs that involve creating bookmarks and handling messages received was refactored to improve readability and clarity. The instantiated "CreateBookmarkArgs" parameter was split into its individual arguments for improved readability. Logging in the Worker.cs file was also fine-tuned, with explicit count of workflows triggered by service bus messages being included in the debug log.
* Refactor code structure for ServiceBus Integration tests
Refactored the ServiceBus Integration tests for improved readability and maintenance. The changes included reducing the number of lines by removing unnecessary curly braces, removing unnecessary use of 'this' qualifier, replacing null checks with null-conditional operators, and organizing various code blocks for better understanding.
* Remove specific activity instance bookmarks
The change clears specific activity instance bookmarks in the context from the WorkflowExecutionContext. This is an extra step in the process of clearing bookmarks, which assists in managing and cleaning up workflow state effectively.
* Update Elsa.Studio.Login.BlazorWasm version
The version number of Elsa.Studio.Login.BlazorWasm has been updated in the Elsa.AllInOne.Web.csproj file. This change reflects the newest release, moving from version 3.0.0-preview.164 to 3.0.0-preview.167.
* Update artwork
* Implement pagination for activity descriptor fetching
Updated the WorkflowDefinitionActivityProvider code to fetch activity descriptors in a paginated manner. This change will be useful to avoid overloading system resources when interacting with large amounts of data. It retrieves a limited number of descriptors per request, looping until all are fetched.
Closes #4689
* Refactor task payload extraction and update workflow builder
Modified the way task payload is extracted in the OrderFoodTaskHandler.cs for more robustness. The input parameter of the workflow builder in the HungryWorkflow.cs file has also been refactored for efficiency. Making these tweaks streamlines management of values within the tasks.
* Update localhost port for workflow sample
The localhost port for the Elsa.Samples.AspNet.RunTaskIntegration has been updated from 7211 to 5001 in both the run-workflow.http and launchSettings.json files. This adjustment ensures that the workflow sample correctly points to the new localhost port, maintaining synchronization within the application.
* Refactor ExpressionExecutionContextExtensions module
Modified the GetInput methods to consider the case where the method is called within a composite activity, ensuring that only local variables have precedence over workflow input when executing within a composite activity.
* Feature HTTP Activity : Allow adding Authorization Header without validation (#4721)
* Add capability to add Authorization Header without validation
* Refactor authorization header handling in HTTP requests
This commit simplifies the syntax for input attributes in the SendHttpRequestBase.cs module. It also renames the boolean value `AddAuthorizatonHeaderWithoutValidation` to `DisableAuthorizationHeaderValidation` for more clarity. This change improves code readability and understanding in relation to handling authorization headers in HTTP requests.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Add a more generic UIHandler to customize how inputAttributes can be handle by UI (#4688)
* add a more generic UIHandler to customize how inputAttributes can be handle by the ui
* Add IPropertyUIHandlerResolver and update PropertyUIHandlerResolver
Introduced a new interface, IPropertyUIHandlerResolver, to resolve UI options for a property. Refactored PropertyUIHandlerResolver to implement this interface and removed the unnecessary partial class structure. Also, cleaned up some unnecessary usings in various files for better code organization.
* Refactor variable name and description in InputDescriptor
The 'uISpecifications' variable in the InputDescriptor model is renamed to 'uiSpecifications' for better readability. Additionally, the associated comment was revised to explain that the dictionary is used by the UI.
* "Refactor codebase for improved organization and cleaner architecture"
The codebase has been significantly refactored, moving several classes to more appropriate namespaces for improved organization and cleaner architecture. This includes shifting UI hint handlers, activities, and memory-related components, amongst others. The changes should improve code readability and maintainability, but as this is a broad refactoring effort, thorough regression testing is advised.
* Add CheckList UIHint with associated handler and provider
This update introduces a new UIHint called CheckList to the Elsa.Workflows.Core. This includes the necessary handler and provider classes. The handler is registered in the WorkflowsFeature.cs, and the CheckList UIHint key has been added to the InputUIHints.cs. Various associated files have been created in both the Elsa.Api.Client and Elsa.Workflows.Core project to support this new UIHint.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Update GitHub actions for packages publishing
This update changes the trigger for the package publishing action to only 'published' releases and prereleases. It also segregates the publishing mechanism into two separate actions: one for publishing preview packages to nuget.org, and another for publishing release packages. This change provides better clarity and control over the publishing process.
* Update FastEndpoints package and enable JWT Bearer Auth
The FastEndpoints package was updated to '5.20.1.7-beta' from '5.20.0-rc1'. Enabling JWT Bearer Authentication was also set from 'false' to 'true' in the SwaggerExtensions file. Removed conditions that were limiting the addition and usage of Swagger to .NET 6.0 or 7.0, which allows the Swagger to be used in any environment.
* Refactor input output assignment and JSON converter
The code has been updated to provide clear and meaningful block reference names using the Humanizer library in the IdentityGraphService. The redundancy in assigning input/output Id's in both IdentityGraphService and InputJsonConverter has also been removed, resulting in cleaner, less convoluted code.
* Enhanced script language support in Elsa.AllInOne.Web
This update introduces expanded language support in Elsa.AllInOne.Web. The changes allow CLR access in JavaScript, and also introduce the ability to use both C# and Python. The changes also include adding project references for the C# and Python modules.
* Add logging to PythonGlobalInterpreterManager
Implemented logging in the PythonGlobalInterpreterManager class to ensure visibility during Python engine initialization and shutdown. These changes are important for spotting errors, troubleshooting issues, and understanding potential failures in Python engine initialization.
* Refactor project structure and Docker configurations
The changes included in this commit are made to refactor the project structure and Docker configurations. Previously, the application was structured around the AllInOneWeb solution, but it has been split into Server.Web and ServerAndStudio.Web solutions for better separation of concerns. Additionally, the Docker configurations have been updated to reflect the new structure, which should streamline the build and deployment process.
* Add GitHub Actions workflows for Elsa Docker images
This commit introduces two new GitHub Actions workflows: one for building and deploying the Elsa Server + Studio Docker image, and another for the Elsa Server Docker image. Both processes automate the build and push actions to Docker Hub using the latest ubuntu version and buildx for multi-platform support.
* Update Dockerfiles and add Python 3.11
Working directories in both ElsaServer.Dockerfile and ElsaServerAndStudio.Dockerfile have been updated for better consistency. Additionally, Python 3.11 has been installed in the ElsaServer.Dockerfile, accompanied by relevant environment variables and symbolic links to improve interoperability.
* Update Dockerfiles for Python 3.11 installation
Added lines in Dockerfiles to install Python 3.11 and set the PYTHONNET_PYDLL environment variable. This enhancement helps to ensure compatibility with recent Python updates and improves general performance.
* Add Elsa.Studio.Web project to the solution
A new project, Elsa.Studio.Web, was added to the solution which included adding appropriate configuration files, host pages, project settings and important dependencies. Necessary adjustments were also made in Elsa.ServerAndStudio.Web.csproj to match with the latest updates.
* Add Docker build script for Elsa Studio
This commit introduces a Dockerfile for the Elsa Studio application and a corresponding GitHub workflow for building and deploying the Docker image. These make it possible to automatically build and deploy Elsa Studio as a Docker image.
* Update Elsa.Studio package versions
Updated the version of Elsa.Studio and Elsa.Studio.Login.BlazorWasm from '3.0.0-preview.169' to '3.0.0-preview.170' in Elsa.Studio.Web and Elsa.ServerAndStudio.Web projects. This is to keep the dependencies up to date and leverage any enhancements or bug fixes in the new version.
* Update Elsa.Studio packages to version 3.0.0-preview.171
The Elsa.Studio and Elsa.Studio.Login.BlazorWasm packages are updated from version 3.0.0-preview.170 to 3.0.0-preview.171 in both Elsa.Studio.Web and Elsa.ServerAndStudio.Web projects. The updated packages include satisfying the latest enhancements and bug fixes.
* Update Elsa.Studio package versions
The Elsa.Studio package versions in ElsaStudioWebAssembly project have been updated from "3.0.0-preview.164" to "3.0.0-preview.171". The packages include Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm.
* Add CodeEditorOptions, EditorHeight, and MultiLineOptions classes
This commit introduces three new classes to the CodeEditor namespace. CodeEditorOptions provides various configuration options for the code editor while EditorHeight defines available height options. MultiLineOptions is specifically built for managing multi-line editor settings.
* Update Elsa.Studio packages to version 3.0.0-preview.172
The packages Elsa.Studio, Elsa.Studio.Login.BlazorWasm and Elsa.Studio.Core.BlazorWasm have been updated to version 3.0.0-preview.172 in the Elsa.Studio.Web, Elsa.ServerAndStudio.Web, and ElsaStudioWebAssembly projects.
* Add non-generic GetVariable method and Python accessors
A non-generic version of GetVariable method has been added to the ExecutionContextProxy.cs, allowing direct access to variables without specifying a type. To leverage this, Python accessors for getting and setting workflow variables have been added to GenerateWorkflowVariableAccessors.cs. This enhances the interaction between the Python scripts and the context variables.
* Add UI hints to input fields in workflow core modules
Changed a number of instances in both activities and UI Hints classes across multiple modules in the workflow core to utilize UIHints. The UI hint "DropDown" has been added to relevant input fields to improve the user interface. Special handling for Enum properties in the drop-down options provider has also been created.
* Update HTTP endpoint authorization handler
The default authorization handler for HTTP endpoints is now the AuthenticationBasedHttpEndpointAuthorizationHandler instead of the AllowAnonymousHttpEndpointAuthorizationHandler. The configuration was updated in HttpFeature.cs and the override in Program.cs was removed. This provides more security to HTTP endpoints by requiring authentication.
* Add JSON editor UI hint to HTTP activities
This commit introduces a JSON editor UI hint to HTTP activities within Elsa Workflow. It includes creating new classes for a JSON editor options provider and a handler for this UI hint. Also, these additions are registered within the Elsa Workflow. The hint is applied to the 'RequestHeaders' and 'ResponseHeaders' input fields found in HTTP-related activity classes.
* Add UI hints for HTTP endpoint and single line fields
Introduced HttpEndpointPathUIHandler to provide additional UI options for the Path input field in the HTTP Endpoint activity. This commits also adds SingleLineProps to offer more options for SingleLine input fields across different modules. The implementation improves UI component interactions.
* Update Elsa.Studio packages to version 3.0.0-preview.174
The Elsa.Studio, Elsa.Studio.Login.BlazorWasm, and Elsa.Studio.Core.BlazorWasm packages have been updated to version 3.0.0-preview.174 across multiple projects. The updated packages should provide the latest functionalities and fixes from the Elsa framework.
* Add API key authentication for Elsa client
Introduced an `ApiKeyHttpMessageHandler` to use an API key as the authorization header for Elsa API client. This ensures secure interaction with the Elsa server. Also made updates to the `ElsaClientOptions` class to include the API key. An `AddElsaClient` method is added with the API key parameter in `DependencyInjectionExtensions` class for convenience.
* add sample CustomUIHandler
* Fix Httpendpoint Path
* Refactor parameter in AddElsaClient method
The parameter "configureOptions" in the AddElsaClient method has been renamed and refactored to allow direct HTTP client configuration. This change enables the actions for configuring the HTTP client to be passed directly, providing greater flexibility for customization.
* Add extension method to get workflow instance ID
This adds a new extension method in HttpResponseMessageExtensions class which retrieves the workflow instance ID from the response. It also includes a HeaderNames class to maintain the consistency of header names used by the Elsa API.
* Remove ElsaClient and related interfaces
Files ElsaClient.cs, IElsaClient.cs and IElsaClientFactory.cs have been deleted from the Elsa.Api.Client project. The commit also includes an update in the DependencyInjectionExtensions.cs file where IElsaClient service registration is removed, reflecting these changes.
* Add condition to return json as string
A condition has been added to check if the returnType is of type 'string'. If so, the json is returned as string directly without converting. This is particularly useful to avoid unnecessary conversion when the returnType is already a string.
* Disable PythonEngine Shutdown to prevent deadlock
* Improve variable resolution in workflow activity
Added a reference to Variable.Id in the SetVariable activity within the Elsa.Workflows.Core module to ensure the correct variable scope is utilized. This change enhances the precision of the variable resolution process by ensuring the correct variable is identified and updated.
* Refactor Elsa API client to use API key authentication
The Elsa API client configuration has been refactored to use API key for authentication instead of HTTP handlers. Besides, the configuration method name was changed to 'AddElsaApiKeyClient' and its parameters were simplified for ease of use. Object 'ElsaClientBuilderOptions' has also been extended with additional properties for further customization.
* Add workflow result variable to context scope
In the ExpressionExecutionContextExtensions module, an additional check and yield operation has been implemented. This allows the inclusion of the workflow result variable, if it exists, to the current context scope.
* Refactor code by renaming and moving classes
Renamed 'VehiculeActivity', 'VehiculeUIHandler' to 'VehicleActivity', 'VehicleUIHandler' and moved them to their separate files. A debouncer was added to InputsTab in the WorkflowDefinitionEditor to limit the rate of firing refresh requests. Optimized codes by reducing unnecessary lines and improved consistency in the 'Program.cs' file.
* Add sample CustomUIHandler (#4729)
* add sample CustomUIHandler
* Refactor code by renaming and moving classes
Renamed 'VehiculeActivity', 'VehiculeUIHandler' to 'VehicleActivity', 'VehicleUIHandler' and moved them to their separate files. A debouncer was added to InputsTab in the WorkflowDefinitionEditor to limit the rate of firing refresh requests. Optimized codes by reducing unnecessary lines and improved consistency in the 'Program.cs' file.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Update Elsa.Studio packages and modify authentication setup
The Elsa.Studio packages have been updated to version "3.0.0-preview.177" from "3.0.0-preview.174" in several project files. Additionally, in the "Program.cs" of ElsaStudioWebAssembly, the way the authentication handler is set up for the remote backend has been simplified and made more straightforward.
* Add System.Runtime to CSharpOptions
The System.Runtime assembly and namespace has been added to CSharpOptions. This extends the functionality capabilities within the Elsa.CSharp module by providing access to the Guid class and its related methods and properties.
* Improve handling of non-HTTP context in HttpEndpoint
Updated the HttpEndpoint class to handle non-HTTP contexts better. Instead of throwing an exception when it finds itself in a non-HTTP context, it now creates a bookmark that allows the invoker to save the state and resume execution from there. A callback has also been added to the bookmarks creation process to prepare for resumption actions.
* Add non-generic variable accessor method
Added a non-generic version of the GetVariable method to the ExecutionContextProxy and GenerateWorkflowVariableAccessors classes in Elsa.CSharp module. Also, extended the CSharpOptions class to include additional namespaces and assemblies related to System.Text.Json. These adjustments provide a more flexible way to access workflow variables and extend the usability of JSON serialization within workflows.
* Add UIHint for FlowJoin activity
The FlowJoin activity's join mode now includes a UIHint, which indicates its input is a dropdown. This improves user interface interaction by allowing the selection of join mode from a dropdown menu rather than manual input.
* Add Parser for Form data 'application/x-www-form-urlencoded' (#4733)
* Update version naming in GitHub Actions
The convention for naming versions in GitHub Actions was modified. Previously, all tags were assigned just a sequential version, even if they were already marked as a release by a tag. Now, if they are tagged and marked as a published release, they use the tag as the version. The change should provide more accurate version information.
* Fix conditional formatting in GitHub workflow
A change has been made to correct the formatting in the conditional statement within the GitHub workflow file. This rectification ensures the proper assignment of the VERSION variable when a new release is published, through proper syntax adherence.
* Refactor variable names and update notification strategy
The variable names '_hosted' and '_backgroundEventService' in ServiceBusTests class have been refactored for clarity. They have been changed to '_backgroundCommandSenderHostedService' and '_backgroundEventPublisherHostedService' respectively to accurately depict the services they are hosting. Also, the notification strategy in the 'BackgroundEventPublisherHostedService' was changed from 'Background' to 'Sequential', fixing the process of sending notifications.
---------
Co-authored-by: Jean-Baptiste Dalle <jean-baptiste.dalle@stereograph.fr>
Co-authored-by: Vincent Doreau <vincent.doreau@stereograph.fr>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: zergmk2 <zergmk2@users.noreply.github.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
Co-authored-by: jdevillard <djay93@hotmail.com>
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
* Update service lifetimes and use IServiceScopeFactory for runtime activities
This commit introduces several modifications targeting the adjustment of service lifetimes. Classes that were previously instantiated as Scoped are changed to Singletons, and vice versa. Furthermore, it employs IServiceScopeFactory to resolve services required for runtime activities. This improves the application's infrastructure by ensuring more efficient service lifetimes and optimizing the runtime resource allocation.
---------
Co-authored-by: jeanbaptistedalle <jean-baptiste.dalle@laposte.net>
Co-authored-by: Jean-Baptiste Dalle <jean-baptiste.dalle@stereograph.fr>
Co-authored-by: Vincent Doreau <vincent.doreau@stereograph.fr>
Co-authored-by: zergmk2 <zergmk2@users.noreply.github.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
Co-authored-by: jdevillard <djay93@hotmail.com>
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
2024-01-02 13:52:53 +00:00
|
|
|
|
|
|
|
|
#### .NET Coding Conventions ####
|
|
|
|
|
|
|
|
|
|
# Organize usings
|
|
|
|
|
dotnet_separate_import_directive_groups = false
|
|
|
|
|
dotnet_sort_system_directives_first = true
|
|
|
|
|
|
|
|
|
|
# this. and Me. preferences
|
|
|
|
|
dotnet_style_qualification_for_event = false
|
|
|
|
|
dotnet_style_qualification_for_field = false
|
|
|
|
|
dotnet_style_qualification_for_method = false
|
|
|
|
|
dotnet_style_qualification_for_property = false
|
|
|
|
|
|
|
|
|
|
# Language keywords vs BCL types preferences
|
|
|
|
|
dotnet_style_predefined_type_for_locals_parameters_members = true
|
|
|
|
|
dotnet_style_predefined_type_for_member_access = true
|
|
|
|
|
|
|
|
|
|
# Parentheses preferences
|
|
|
|
|
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
|
|
|
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
|
|
|
|
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
|
|
|
|
|
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
|
|
|
|
|
|
|
|
|
# Modifier preferences
|
|
|
|
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
|
|
|
|
|
|
|
|
|
# Expression-level preferences
|
|
|
|
|
dotnet_style_coalesce_expression = true
|
|
|
|
|
dotnet_style_collection_initializer = true
|
|
|
|
|
dotnet_style_explicit_tuple_names = true
|
|
|
|
|
dotnet_style_namespace_match_folder = true
|
|
|
|
|
dotnet_style_null_propagation = true
|
|
|
|
|
dotnet_style_object_initializer = true
|
|
|
|
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
|
|
|
|
dotnet_style_prefer_auto_properties = true
|
|
|
|
|
dotnet_style_prefer_compound_assignment = true
|
|
|
|
|
dotnet_style_prefer_conditional_expression_over_assignment = true
|
|
|
|
|
dotnet_style_prefer_conditional_expression_over_return = true
|
|
|
|
|
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
|
|
|
|
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true
|
|
|
|
|
dotnet_style_prefer_inferred_tuple_names = true
|
|
|
|
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
|
|
|
|
|
dotnet_style_prefer_simplified_boolean_expressions = true
|
|
|
|
|
dotnet_style_prefer_simplified_interpolation = true
|
|
|
|
|
|
|
|
|
|
# Field preferences
|
|
|
|
|
dotnet_style_readonly_field = true
|
|
|
|
|
|
|
|
|
|
# Parameter preferences
|
|
|
|
|
dotnet_code_quality_unused_parameters = all
|
|
|
|
|
|
|
|
|
|
# Suppression preferences
|
|
|
|
|
dotnet_remove_unnecessary_suppression_exclusions = none
|
|
|
|
|
|
|
|
|
|
# New line preferences
|
|
|
|
|
dotnet_style_allow_multiple_blank_lines_experimental = true
|
|
|
|
|
dotnet_style_allow_statement_immediately_after_block_experimental = true
|
|
|
|
|
|
|
|
|
|
#### C# Coding Conventions ####
|
|
|
|
|
|
|
|
|
|
# var preferences
|
2025-01-09 09:27:55 +00:00
|
|
|
csharp_style_var_elsewhere = true
|
|
|
|
|
csharp_style_var_for_built_in_types = true
|
|
|
|
|
csharp_style_var_when_type_is_apparent = true
|
Merge scope change into main (#4738)
* Feature/change singleton to scope (#4635)
* feat(scoped): move dependencies to scoped instead of singleton if possible.
* fix(scoped): Timer and LiveTest
* fix(scoped): change scope of python and csharp features
* fix(scoped): remove FireAndForgetStrategy and replace if by BackgroundStrategy
* fix(scoped): add .editorconfig to avoid changing the sort order of using (system.* first) and fix the scope in BackgroundEventPublisher
* Update title in README.md
The README.md file has been updated to reflect the new version of Elsa - Elsa 3.0.
* Remove npm-packages workflow, adjust branch triggers in workflows
The npm-packages.yml workflow has been removed. The branch triggers in the workflows npm-packages.yml, packages.yml, and all-in-one-web.yml have been changed from 'v3' to 'main'. An unnecessary reference to the deleted workflow file npm-packages.yml is also removed from Elsa.sln.
* Remove obsolete files from designer packages
Numerous unused and obsolete files have been removed from various designer packages including angular-workspace, elsa-workflows-designer, react-workspace, and others. This cleanup enhances the maintainability of the project by eliminating unnecessary files and reducing clutter.
* Add badges to README.md
The README.md file has been updated to include badges for packages, continuous delivery, and discussions related to Elsa workflows. These badges provide quick access to key information and resources like Nuget, npm, GitHub Actions, feedz.io, Docker, Discord, Stack Overflow, and subreddit subscribers.
* Update README with enhanced instructions for Elsa server and studio
The README updates include specific instructions for running the Elsa server on port 5001 and the Elsa studio application on port 6001. These enhanced guidelines provide comprehensive steps for configuring the applications regarding authentication, module usage, and use of API endpoints.
* Add IsWorkflowDefinitionActivity method to ActivityExtensions
A new method, GetIsWorkflowDefinitionActivity, has been added to the ActivityExtensions class. This method checks a given JsonObject representing an activity to determine if it's a workflow definition activity. It returns true if the activity indeed is; otherwise, it returns false.
* Refactor MassTransit & AzureServiceBus configuration and delete unnecessary options
AzureServiceBusOption.cs and RabbitMqOptions.cs files were removed as they're no longer needed. The system now defers the configuration of MassTransit and AzureServiceBus to the application layer (Program.cs). The configuration for PrefetchCount is also allowed at the transport-level. A new abstraction, ConsumerTypeDefinition, collects all the consumer types with their respective definitions if provided. Adjustments have been made in related extension methods and classes to reflect these changes.
* Enhance configuration options for MassTransit
This commit enhances the configuration options for the MassTransit integration, providing additional settings for both Azure Service Bus and RabbitMq. It also refines the MassTransit workflow dispatcher configuration by allowing for custom dispatcher options. A default RabbitMq connection string has been added to the appsettings.json.
* Renamed AI file
* Update Elsa.Studio package versions
The package references for Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm in Elsa.AllInOne.Web and ElsaStudioWebAssembly projects were updated. The version has been changed from 3.0.0-preview.160 to 3.0.0-preview.164 to incorporate the latest features and bug fixes.
* Reorganize README and add Docker instructions
The README file was reorganized to make it more readable by grouping related badges together. Additionally, instructions on how to start the Elsa Docker container were appended for users who want to quickly try out the Elsa Studio and Elsa Server.
* Update description in README.md
The current diff modifies the description of the Docker image in the README file. The revised description consolidates information about the image, its reference ASP.NET application nature, and its non-production intention into a single, more succinct sentence.
* Add tests for implicit joins and fix duplicate activity scheduling
This commit includes new integration tests for implicit join scenarios. The tests ensure that join and parallel join activities execute correctly and complete as expected. Additionally, a change has been made to the workflow execution context to prevent duplicate activity scheduling. Now, aside from checking if the activity is already scheduled, it also checks if the activity is scheduled for the specified owner.
Fixes #4703
* Add ExpressionEvaluatorOptions to JavaScriptEvaluator
The JavaScriptEvaluator now accepts an options parameter of type ExpressionEvaluatorOptions. This allows adding custom arguments to the evaluation context. An 'Empty' static instance of ExpressionEvaluatorOptions is added for convenience. Additionally, the usage of MassTransitAzureServiceBus in Program.cs is turned off by setting the flag to 'false'.
* Update README to add access information when user tried to run elsa with docker (#4708)
* [no ci] add link to Elsa 2 in README
* Remove Console and ASP.NET examples, simplify README.md
Simplified README.md by removing in-depth Console and ASP.NET Core examples, as well as mentions about building from source, serving overall clarity and readability. Added descriptions for coded and visual workflow design possibilities.
* Implement batch processing in BulkDispatchWorkflows
The changes introduce a batch processing mechanism in the BulkDispatchWorkflows activity. Previously, each workflow was dispatched individually. Now, the process groups the workflows in batches, processes each batch concurrently, and handles errors. This change improves performance, particularly for large data sources.
* Refactor workflow methods for async execution
Modified methods in the WorkflowInstance.cs to implement re-entrant approach for asynchronous execution. This is achieved by replacing 'await' with task-based calls passed through the Context.ReenterAfter method, providing more efficient non-blocking operations. Minor changes were also made in ClusterExtensions.cs and ProtoActorWorkflowRuntime.cs, including code clean up and slight modifications to maintain consistency.
* Refactor background activities scheduling
Background activities scheduling was moved to its own middleware where the actual scheduling happens instead of in the invoking middleware. Removed ScheduleBackgroundActivities.cs handler and added ScheduleBackgroundActivitiesMiddleware.cs instead. As a part of this change, restructured BackgroundActivityInvokerMiddleware to BackgroundActivityCollectorMiddleware, and updated all relevant references.
Minor modifications to a few other files include changes in their package dependencies and activity kind settings.
* Change ActivityKind from Job to Task in BulkDispatchWorkflows
The ActivityKind property in BulkDispatchWorkflows class has been changed from Job to Task. This updates the type of activity associated with the BulkDispatchWorkflows process within the Elsa workflow runtime module.
* Update BulkDispatchWorkflows activity
The BulkDispatchWorkflows.cs activity in Elsa.Workflows.Runtime module has been updated with some key changes: Added detailed description to the input element, introduced the dispatchedInstancesCount to accurately track the number of instances dispatched, and removed some unnecessary white spaces for improved readability.
* Add methods to handle activity run asynchronously flag
New methods have been added to handle the custom property 'runAsynchronously' on a JsonObject activity. These methods will help in getting and setting a value that indicates whether a specified activity can trigger a workflow asynchronously. This additional level of control can enhance workflow execution based on specific requirements.
* Add 'Persister' to UserDictionary in DotSettings
The new dictionary entry for 'Persister' has been added to Elsa.sln.DotSettings. This expands the vocabulary of the solution's user dictionary and ensures that 'Persister' is recognized as a valid term within the project context.
* Add Bookmark Persister and Bookmark Updater
The code introduces BookmarkPersister for processing bookmarks as part of the workflow runtime. This refactoring improves readability and maintainability by separating the bookmark persisting logic from the PersistBookmarkMiddleware class. A new class, BookmarkUpdater, is also added to handle updating of bookmarks. Changes also include adjustments to several other classes for improved functionality and code consistency.
* Add bookmarks processing to DefaultBackgroundActivityInvoker
The code addition includes two dependencies, IBookmarksPersister and IWorkflowStateExtractor, in the DefaultBackgroundActivityInvoker service. With these changes, during the workflow execution phase, bookmarks are captured and processed for any state changes. These modifications provide more control and efficiency over handling workflow states during the system's background operations.
* Update workflow handling and simplify codebase
Refactored the workflow handling logic and simplified numerous components in the codebase. Major changes include the enhancement of the Workflow Runtime handler, altering the broadcast and deliver functions in the Default Workflow Inbox, and the removal of unnecessary details in the Workflow Runtime feature. Also, unnecessary services and requests were removed for better code efficiency and readability.
* Add conversion support for long type in ObjectConverter
The ObjectConverter file has been updated to support conversion of 'long' type. This is done by adding an additional conditional statement for checking the underlying source type for 'long', then returning the converted value.
* Add 'Noop' method to WorkflowExecutionContext
A Noop method has been added to the WorkflowExecutionContext, and is now assigned to the ExecuteDelegate field when no resumption point is specified. The change, will prevent the invocation of the regular "ExecuteAsync" method, closing the activity without additional operations.
* Add AutoComplete option to workflow bookmarks
The AutoComplete option has been added to the workflow bookmarks, which determines whether the activity should automatically be completed if no callback is specified. This change improves the flexibility of bookmark creation and impacts various workflow elements and procedures. The corresponding adjustments have been made at functions where bookmarks are used or created.
* Refactor object initialization in ActivityExecutionContext
Refactoring was performed in the ActivityExecutionContext class to use object initializers for readability and clarity. This modification mainly targets the CreateBookmark and ScheduleActivityAsync methods, making their code more explicit and thus easier to understand.
* Refactor code for readability and improved logging
Code in several activity files and Worker.cs that involve creating bookmarks and handling messages received was refactored to improve readability and clarity. The instantiated "CreateBookmarkArgs" parameter was split into its individual arguments for improved readability. Logging in the Worker.cs file was also fine-tuned, with explicit count of workflows triggered by service bus messages being included in the debug log.
* Refactor code structure for ServiceBus Integration tests
Refactored the ServiceBus Integration tests for improved readability and maintenance. The changes included reducing the number of lines by removing unnecessary curly braces, removing unnecessary use of 'this' qualifier, replacing null checks with null-conditional operators, and organizing various code blocks for better understanding.
* Remove specific activity instance bookmarks
The change clears specific activity instance bookmarks in the context from the WorkflowExecutionContext. This is an extra step in the process of clearing bookmarks, which assists in managing and cleaning up workflow state effectively.
* Update Elsa.Studio.Login.BlazorWasm version
The version number of Elsa.Studio.Login.BlazorWasm has been updated in the Elsa.AllInOne.Web.csproj file. This change reflects the newest release, moving from version 3.0.0-preview.164 to 3.0.0-preview.167.
* Update artwork
* Implement pagination for activity descriptor fetching
Updated the WorkflowDefinitionActivityProvider code to fetch activity descriptors in a paginated manner. This change will be useful to avoid overloading system resources when interacting with large amounts of data. It retrieves a limited number of descriptors per request, looping until all are fetched.
Closes #4689
* Refactor task payload extraction and update workflow builder
Modified the way task payload is extracted in the OrderFoodTaskHandler.cs for more robustness. The input parameter of the workflow builder in the HungryWorkflow.cs file has also been refactored for efficiency. Making these tweaks streamlines management of values within the tasks.
* Update localhost port for workflow sample
The localhost port for the Elsa.Samples.AspNet.RunTaskIntegration has been updated from 7211 to 5001 in both the run-workflow.http and launchSettings.json files. This adjustment ensures that the workflow sample correctly points to the new localhost port, maintaining synchronization within the application.
* Refactor ExpressionExecutionContextExtensions module
Modified the GetInput methods to consider the case where the method is called within a composite activity, ensuring that only local variables have precedence over workflow input when executing within a composite activity.
* Feature HTTP Activity : Allow adding Authorization Header without validation (#4721)
* Add capability to add Authorization Header without validation
* Refactor authorization header handling in HTTP requests
This commit simplifies the syntax for input attributes in the SendHttpRequestBase.cs module. It also renames the boolean value `AddAuthorizatonHeaderWithoutValidation` to `DisableAuthorizationHeaderValidation` for more clarity. This change improves code readability and understanding in relation to handling authorization headers in HTTP requests.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Add a more generic UIHandler to customize how inputAttributes can be handle by UI (#4688)
* add a more generic UIHandler to customize how inputAttributes can be handle by the ui
* Add IPropertyUIHandlerResolver and update PropertyUIHandlerResolver
Introduced a new interface, IPropertyUIHandlerResolver, to resolve UI options for a property. Refactored PropertyUIHandlerResolver to implement this interface and removed the unnecessary partial class structure. Also, cleaned up some unnecessary usings in various files for better code organization.
* Refactor variable name and description in InputDescriptor
The 'uISpecifications' variable in the InputDescriptor model is renamed to 'uiSpecifications' for better readability. Additionally, the associated comment was revised to explain that the dictionary is used by the UI.
* "Refactor codebase for improved organization and cleaner architecture"
The codebase has been significantly refactored, moving several classes to more appropriate namespaces for improved organization and cleaner architecture. This includes shifting UI hint handlers, activities, and memory-related components, amongst others. The changes should improve code readability and maintainability, but as this is a broad refactoring effort, thorough regression testing is advised.
* Add CheckList UIHint with associated handler and provider
This update introduces a new UIHint called CheckList to the Elsa.Workflows.Core. This includes the necessary handler and provider classes. The handler is registered in the WorkflowsFeature.cs, and the CheckList UIHint key has been added to the InputUIHints.cs. Various associated files have been created in both the Elsa.Api.Client and Elsa.Workflows.Core project to support this new UIHint.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Update GitHub actions for packages publishing
This update changes the trigger for the package publishing action to only 'published' releases and prereleases. It also segregates the publishing mechanism into two separate actions: one for publishing preview packages to nuget.org, and another for publishing release packages. This change provides better clarity and control over the publishing process.
* Update FastEndpoints package and enable JWT Bearer Auth
The FastEndpoints package was updated to '5.20.1.7-beta' from '5.20.0-rc1'. Enabling JWT Bearer Authentication was also set from 'false' to 'true' in the SwaggerExtensions file. Removed conditions that were limiting the addition and usage of Swagger to .NET 6.0 or 7.0, which allows the Swagger to be used in any environment.
* Refactor input output assignment and JSON converter
The code has been updated to provide clear and meaningful block reference names using the Humanizer library in the IdentityGraphService. The redundancy in assigning input/output Id's in both IdentityGraphService and InputJsonConverter has also been removed, resulting in cleaner, less convoluted code.
* Enhanced script language support in Elsa.AllInOne.Web
This update introduces expanded language support in Elsa.AllInOne.Web. The changes allow CLR access in JavaScript, and also introduce the ability to use both C# and Python. The changes also include adding project references for the C# and Python modules.
* Add logging to PythonGlobalInterpreterManager
Implemented logging in the PythonGlobalInterpreterManager class to ensure visibility during Python engine initialization and shutdown. These changes are important for spotting errors, troubleshooting issues, and understanding potential failures in Python engine initialization.
* Refactor project structure and Docker configurations
The changes included in this commit are made to refactor the project structure and Docker configurations. Previously, the application was structured around the AllInOneWeb solution, but it has been split into Server.Web and ServerAndStudio.Web solutions for better separation of concerns. Additionally, the Docker configurations have been updated to reflect the new structure, which should streamline the build and deployment process.
* Add GitHub Actions workflows for Elsa Docker images
This commit introduces two new GitHub Actions workflows: one for building and deploying the Elsa Server + Studio Docker image, and another for the Elsa Server Docker image. Both processes automate the build and push actions to Docker Hub using the latest ubuntu version and buildx for multi-platform support.
* Update Dockerfiles and add Python 3.11
Working directories in both ElsaServer.Dockerfile and ElsaServerAndStudio.Dockerfile have been updated for better consistency. Additionally, Python 3.11 has been installed in the ElsaServer.Dockerfile, accompanied by relevant environment variables and symbolic links to improve interoperability.
* Update Dockerfiles for Python 3.11 installation
Added lines in Dockerfiles to install Python 3.11 and set the PYTHONNET_PYDLL environment variable. This enhancement helps to ensure compatibility with recent Python updates and improves general performance.
* Add Elsa.Studio.Web project to the solution
A new project, Elsa.Studio.Web, was added to the solution which included adding appropriate configuration files, host pages, project settings and important dependencies. Necessary adjustments were also made in Elsa.ServerAndStudio.Web.csproj to match with the latest updates.
* Add Docker build script for Elsa Studio
This commit introduces a Dockerfile for the Elsa Studio application and a corresponding GitHub workflow for building and deploying the Docker image. These make it possible to automatically build and deploy Elsa Studio as a Docker image.
* Update Elsa.Studio package versions
Updated the version of Elsa.Studio and Elsa.Studio.Login.BlazorWasm from '3.0.0-preview.169' to '3.0.0-preview.170' in Elsa.Studio.Web and Elsa.ServerAndStudio.Web projects. This is to keep the dependencies up to date and leverage any enhancements or bug fixes in the new version.
* Update Elsa.Studio packages to version 3.0.0-preview.171
The Elsa.Studio and Elsa.Studio.Login.BlazorWasm packages are updated from version 3.0.0-preview.170 to 3.0.0-preview.171 in both Elsa.Studio.Web and Elsa.ServerAndStudio.Web projects. The updated packages include satisfying the latest enhancements and bug fixes.
* Update Elsa.Studio package versions
The Elsa.Studio package versions in ElsaStudioWebAssembly project have been updated from "3.0.0-preview.164" to "3.0.0-preview.171". The packages include Elsa.Studio, Elsa.Studio.Core.BlazorWasm, and Elsa.Studio.Login.BlazorWasm.
* Add CodeEditorOptions, EditorHeight, and MultiLineOptions classes
This commit introduces three new classes to the CodeEditor namespace. CodeEditorOptions provides various configuration options for the code editor while EditorHeight defines available height options. MultiLineOptions is specifically built for managing multi-line editor settings.
* Update Elsa.Studio packages to version 3.0.0-preview.172
The packages Elsa.Studio, Elsa.Studio.Login.BlazorWasm and Elsa.Studio.Core.BlazorWasm have been updated to version 3.0.0-preview.172 in the Elsa.Studio.Web, Elsa.ServerAndStudio.Web, and ElsaStudioWebAssembly projects.
* Add non-generic GetVariable method and Python accessors
A non-generic version of GetVariable method has been added to the ExecutionContextProxy.cs, allowing direct access to variables without specifying a type. To leverage this, Python accessors for getting and setting workflow variables have been added to GenerateWorkflowVariableAccessors.cs. This enhances the interaction between the Python scripts and the context variables.
* Add UI hints to input fields in workflow core modules
Changed a number of instances in both activities and UI Hints classes across multiple modules in the workflow core to utilize UIHints. The UI hint "DropDown" has been added to relevant input fields to improve the user interface. Special handling for Enum properties in the drop-down options provider has also been created.
* Update HTTP endpoint authorization handler
The default authorization handler for HTTP endpoints is now the AuthenticationBasedHttpEndpointAuthorizationHandler instead of the AllowAnonymousHttpEndpointAuthorizationHandler. The configuration was updated in HttpFeature.cs and the override in Program.cs was removed. This provides more security to HTTP endpoints by requiring authentication.
* Add JSON editor UI hint to HTTP activities
This commit introduces a JSON editor UI hint to HTTP activities within Elsa Workflow. It includes creating new classes for a JSON editor options provider and a handler for this UI hint. Also, these additions are registered within the Elsa Workflow. The hint is applied to the 'RequestHeaders' and 'ResponseHeaders' input fields found in HTTP-related activity classes.
* Add UI hints for HTTP endpoint and single line fields
Introduced HttpEndpointPathUIHandler to provide additional UI options for the Path input field in the HTTP Endpoint activity. This commits also adds SingleLineProps to offer more options for SingleLine input fields across different modules. The implementation improves UI component interactions.
* Update Elsa.Studio packages to version 3.0.0-preview.174
The Elsa.Studio, Elsa.Studio.Login.BlazorWasm, and Elsa.Studio.Core.BlazorWasm packages have been updated to version 3.0.0-preview.174 across multiple projects. The updated packages should provide the latest functionalities and fixes from the Elsa framework.
* Add API key authentication for Elsa client
Introduced an `ApiKeyHttpMessageHandler` to use an API key as the authorization header for Elsa API client. This ensures secure interaction with the Elsa server. Also made updates to the `ElsaClientOptions` class to include the API key. An `AddElsaClient` method is added with the API key parameter in `DependencyInjectionExtensions` class for convenience.
* add sample CustomUIHandler
* Fix Httpendpoint Path
* Refactor parameter in AddElsaClient method
The parameter "configureOptions" in the AddElsaClient method has been renamed and refactored to allow direct HTTP client configuration. This change enables the actions for configuring the HTTP client to be passed directly, providing greater flexibility for customization.
* Add extension method to get workflow instance ID
This adds a new extension method in HttpResponseMessageExtensions class which retrieves the workflow instance ID from the response. It also includes a HeaderNames class to maintain the consistency of header names used by the Elsa API.
* Remove ElsaClient and related interfaces
Files ElsaClient.cs, IElsaClient.cs and IElsaClientFactory.cs have been deleted from the Elsa.Api.Client project. The commit also includes an update in the DependencyInjectionExtensions.cs file where IElsaClient service registration is removed, reflecting these changes.
* Add condition to return json as string
A condition has been added to check if the returnType is of type 'string'. If so, the json is returned as string directly without converting. This is particularly useful to avoid unnecessary conversion when the returnType is already a string.
* Disable PythonEngine Shutdown to prevent deadlock
* Improve variable resolution in workflow activity
Added a reference to Variable.Id in the SetVariable activity within the Elsa.Workflows.Core module to ensure the correct variable scope is utilized. This change enhances the precision of the variable resolution process by ensuring the correct variable is identified and updated.
* Refactor Elsa API client to use API key authentication
The Elsa API client configuration has been refactored to use API key for authentication instead of HTTP handlers. Besides, the configuration method name was changed to 'AddElsaApiKeyClient' and its parameters were simplified for ease of use. Object 'ElsaClientBuilderOptions' has also been extended with additional properties for further customization.
* Add workflow result variable to context scope
In the ExpressionExecutionContextExtensions module, an additional check and yield operation has been implemented. This allows the inclusion of the workflow result variable, if it exists, to the current context scope.
* Refactor code by renaming and moving classes
Renamed 'VehiculeActivity', 'VehiculeUIHandler' to 'VehicleActivity', 'VehicleUIHandler' and moved them to their separate files. A debouncer was added to InputsTab in the WorkflowDefinitionEditor to limit the rate of firing refresh requests. Optimized codes by reducing unnecessary lines and improved consistency in the 'Program.cs' file.
* Add sample CustomUIHandler (#4729)
* add sample CustomUIHandler
* Refactor code by renaming and moving classes
Renamed 'VehiculeActivity', 'VehiculeUIHandler' to 'VehicleActivity', 'VehicleUIHandler' and moved them to their separate files. A debouncer was added to InputsTab in the WorkflowDefinitionEditor to limit the rate of firing refresh requests. Optimized codes by reducing unnecessary lines and improved consistency in the 'Program.cs' file.
---------
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
* Update Elsa.Studio packages and modify authentication setup
The Elsa.Studio packages have been updated to version "3.0.0-preview.177" from "3.0.0-preview.174" in several project files. Additionally, in the "Program.cs" of ElsaStudioWebAssembly, the way the authentication handler is set up for the remote backend has been simplified and made more straightforward.
* Add System.Runtime to CSharpOptions
The System.Runtime assembly and namespace has been added to CSharpOptions. This extends the functionality capabilities within the Elsa.CSharp module by providing access to the Guid class and its related methods and properties.
* Improve handling of non-HTTP context in HttpEndpoint
Updated the HttpEndpoint class to handle non-HTTP contexts better. Instead of throwing an exception when it finds itself in a non-HTTP context, it now creates a bookmark that allows the invoker to save the state and resume execution from there. A callback has also been added to the bookmarks creation process to prepare for resumption actions.
* Add non-generic variable accessor method
Added a non-generic version of the GetVariable method to the ExecutionContextProxy and GenerateWorkflowVariableAccessors classes in Elsa.CSharp module. Also, extended the CSharpOptions class to include additional namespaces and assemblies related to System.Text.Json. These adjustments provide a more flexible way to access workflow variables and extend the usability of JSON serialization within workflows.
* Add UIHint for FlowJoin activity
The FlowJoin activity's join mode now includes a UIHint, which indicates its input is a dropdown. This improves user interface interaction by allowing the selection of join mode from a dropdown menu rather than manual input.
* Add Parser for Form data 'application/x-www-form-urlencoded' (#4733)
* Update version naming in GitHub Actions
The convention for naming versions in GitHub Actions was modified. Previously, all tags were assigned just a sequential version, even if they were already marked as a release by a tag. Now, if they are tagged and marked as a published release, they use the tag as the version. The change should provide more accurate version information.
* Fix conditional formatting in GitHub workflow
A change has been made to correct the formatting in the conditional statement within the GitHub workflow file. This rectification ensures the proper assignment of the VERSION variable when a new release is published, through proper syntax adherence.
* Refactor variable names and update notification strategy
The variable names '_hosted' and '_backgroundEventService' in ServiceBusTests class have been refactored for clarity. They have been changed to '_backgroundCommandSenderHostedService' and '_backgroundEventPublisherHostedService' respectively to accurately depict the services they are hosting. Also, the notification strategy in the 'BackgroundEventPublisherHostedService' was changed from 'Background' to 'Sequential', fixing the process of sending notifications.
---------
Co-authored-by: Jean-Baptiste Dalle <jean-baptiste.dalle@stereograph.fr>
Co-authored-by: Vincent Doreau <vincent.doreau@stereograph.fr>
Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Co-authored-by: zergmk2 <zergmk2@users.noreply.github.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
Co-authored-by: jdevillard <djay93@hotmail.com>
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
* Update service lifetimes and use IServiceScopeFactory for runtime activities
This commit introduces several modifications targeting the adjustment of service lifetimes. Classes that were previously instantiated as Scoped are changed to Singletons, and vice versa. Furthermore, it employs IServiceScopeFactory to resolve services required for runtime activities. This improves the application's infrastructure by ensuring more efficient service lifetimes and optimizing the runtime resource allocation.
---------
Co-authored-by: jeanbaptistedalle <jean-baptiste.dalle@laposte.net>
Co-authored-by: Jean-Baptiste Dalle <jean-baptiste.dalle@stereograph.fr>
Co-authored-by: Vincent Doreau <vincent.doreau@stereograph.fr>
Co-authored-by: zergmk2 <zergmk2@users.noreply.github.com>
Co-authored-by: Mohamed Ali <antivirus.cs@gmail.com>
Co-authored-by: jdevillard <djay93@hotmail.com>
Co-authored-by: Jérémie DEVILLARD <jdevillard@users.noreply.github.com>
2024-01-02 13:52:53 +00:00
|
|
|
|
|
|
|
|
# Expression-bodied members
|
|
|
|
|
csharp_style_expression_bodied_accessors = true
|
|
|
|
|
csharp_style_expression_bodied_constructors = false
|
|
|
|
|
csharp_style_expression_bodied_indexers = true
|
|
|
|
|
csharp_style_expression_bodied_lambdas = true
|
|
|
|
|
csharp_style_expression_bodied_local_functions = false
|
|
|
|
|
csharp_style_expression_bodied_methods = false
|
|
|
|
|
csharp_style_expression_bodied_operators = false
|
|
|
|
|
csharp_style_expression_bodied_properties = true
|
|
|
|
|
|
|
|
|
|
# Pattern matching preferences
|
|
|
|
|
csharp_style_pattern_matching_over_as_with_null_check = true
|
|
|
|
|
csharp_style_pattern_matching_over_is_with_cast_check = true
|
|
|
|
|
csharp_style_prefer_extended_property_pattern = true
|
|
|
|
|
csharp_style_prefer_not_pattern = true
|
|
|
|
|
csharp_style_prefer_pattern_matching = true
|
|
|
|
|
csharp_style_prefer_switch_expression = true
|
|
|
|
|
|
|
|
|
|
# Null-checking preferences
|
|
|
|
|
csharp_style_conditional_delegate_call = true
|
|
|
|
|
|
|
|
|
|
# Modifier preferences
|
|
|
|
|
csharp_prefer_static_local_function = true
|
|
|
|
|
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
|
|
|
|
|
csharp_style_prefer_readonly_struct = true
|
|
|
|
|
csharp_style_prefer_readonly_struct_member = true
|
|
|
|
|
|
|
|
|
|
# Code-block preferences
|
|
|
|
|
csharp_prefer_braces = true
|
|
|
|
|
csharp_prefer_simple_using_statement = true
|
|
|
|
|
csharp_style_namespace_declarations = file_scoped:warning
|
|
|
|
|
csharp_style_prefer_method_group_conversion = true
|
|
|
|
|
csharp_style_prefer_primary_constructors = true
|
|
|
|
|
csharp_style_prefer_top_level_statements = true
|
|
|
|
|
|
|
|
|
|
# Expression-level preferences
|
|
|
|
|
csharp_prefer_simple_default_expression = true
|
|
|
|
|
csharp_style_deconstructed_variable_declaration = true
|
|
|
|
|
csharp_style_implicit_object_creation_when_type_is_apparent = true
|
|
|
|
|
csharp_style_inlined_variable_declaration = true
|
|
|
|
|
csharp_style_prefer_index_operator = true
|
|
|
|
|
csharp_style_prefer_local_over_anonymous_function = true
|
|
|
|
|
csharp_style_prefer_null_check_over_type_check = true
|
|
|
|
|
csharp_style_prefer_range_operator = true
|
|
|
|
|
csharp_style_prefer_tuple_swap = true
|
|
|
|
|
csharp_style_prefer_utf8_string_literals = true
|
|
|
|
|
csharp_style_throw_expression = true
|
|
|
|
|
csharp_style_unused_value_assignment_preference = discard_variable
|
|
|
|
|
csharp_style_unused_value_expression_statement_preference = discard_variable
|
|
|
|
|
|
|
|
|
|
# 'using' directive preferences
|
|
|
|
|
csharp_using_directive_placement = outside_namespace
|
|
|
|
|
|
|
|
|
|
# New line preferences
|
|
|
|
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
|
|
|
|
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
|
|
|
|
|
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
|
|
|
|
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
|
|
|
|
|
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
|
|
|
|
|
|
|
|
|
#### C# Formatting Rules ####
|
|
|
|
|
|
|
|
|
|
# New line preferences
|
|
|
|
|
csharp_new_line_before_catch = true
|
|
|
|
|
csharp_new_line_before_else = true
|
|
|
|
|
csharp_new_line_before_finally = true
|
|
|
|
|
csharp_new_line_before_members_in_anonymous_types = true
|
|
|
|
|
csharp_new_line_before_members_in_object_initializers = true
|
|
|
|
|
csharp_new_line_before_open_brace = all
|
|
|
|
|
csharp_new_line_between_query_expression_clauses = true
|
|
|
|
|
|
|
|
|
|
# Indentation preferences
|
|
|
|
|
csharp_indent_block_contents = true
|
|
|
|
|
csharp_indent_braces = false
|
|
|
|
|
csharp_indent_case_contents = true
|
|
|
|
|
csharp_indent_case_contents_when_block = true
|
|
|
|
|
csharp_indent_labels = one_less_than_current
|
|
|
|
|
csharp_indent_switch_labels = true
|
|
|
|
|
|
|
|
|
|
# Space preferences
|
|
|
|
|
csharp_space_after_cast = false
|
|
|
|
|
csharp_space_after_colon_in_inheritance_clause = true
|
|
|
|
|
csharp_space_after_comma = true
|
|
|
|
|
csharp_space_after_dot = false
|
|
|
|
|
csharp_space_after_keywords_in_control_flow_statements = true
|
|
|
|
|
csharp_space_after_semicolon_in_for_statement = true
|
|
|
|
|
csharp_space_around_binary_operators = before_and_after
|
|
|
|
|
csharp_space_around_declaration_statements = false
|
|
|
|
|
csharp_space_before_colon_in_inheritance_clause = true
|
|
|
|
|
csharp_space_before_comma = false
|
|
|
|
|
csharp_space_before_dot = false
|
|
|
|
|
csharp_space_before_open_square_brackets = false
|
|
|
|
|
csharp_space_before_semicolon_in_for_statement = false
|
|
|
|
|
csharp_space_between_empty_square_brackets = false
|
|
|
|
|
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
|
|
|
|
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
|
|
|
|
csharp_space_between_method_call_parameter_list_parentheses = false
|
|
|
|
|
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
|
|
|
|
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
|
|
|
|
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
|
|
|
|
csharp_space_between_parentheses = false
|
|
|
|
|
csharp_space_between_square_brackets = false
|
|
|
|
|
|
|
|
|
|
# Wrapping preferences
|
|
|
|
|
csharp_preserve_single_line_blocks = true
|
|
|
|
|
csharp_preserve_single_line_statements = true
|
|
|
|
|
|
|
|
|
|
#### Naming styles ####
|
|
|
|
|
|
|
|
|
|
# Naming rules
|
|
|
|
|
|
|
|
|
|
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
|
|
|
|
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
|
|
|
|
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
|
|
|
|
|
|
|
|
|
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
|
|
|
|
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
|
|
|
|
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
|
|
|
|
|
|
|
|
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
|
|
|
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
|
|
|
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
|
|
|
|
|
|
|
|
|
# Symbol specifications
|
|
|
|
|
|
|
|
|
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
|
|
|
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
|
|
|
|
dotnet_naming_symbols.interface.required_modifiers =
|
|
|
|
|
|
|
|
|
|
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
|
|
|
|
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
|
|
|
|
dotnet_naming_symbols.types.required_modifiers =
|
|
|
|
|
|
|
|
|
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
|
|
|
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
|
|
|
|
dotnet_naming_symbols.non_field_members.required_modifiers =
|
|
|
|
|
|
|
|
|
|
# Naming styles
|
|
|
|
|
|
|
|
|
|
dotnet_naming_style.pascal_case.required_prefix =
|
|
|
|
|
dotnet_naming_style.pascal_case.required_suffix =
|
|
|
|
|
dotnet_naming_style.pascal_case.word_separator =
|
|
|
|
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
|
|
|
|
|
|
|
|
|
dotnet_naming_style.begins_with_i.required_prefix = I
|
|
|
|
|
dotnet_naming_style.begins_with_i.required_suffix =
|
|
|
|
|
dotnet_naming_style.begins_with_i.word_separator =
|
|
|
|
|
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
Remove signal capturing phase (#5501)
* 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.
2024-06-04 07:54:27 +00:00
|
|
|
|
|
|
|
|
# ReSharper properties
|
|
|
|
|
resharper_max_array_initializer_elements_on_line = 50
|
|
|
|
|
resharper_max_initializer_elements_on_line = 1
|
|
|
|
|
resharper_wrap_array_initializer_style = chop_if_long
|