elsa-core/test/integration/Elsa.Workflows.IntegrationTests/Scenarios
Sipke Schoorstra d6c14d9878
Simplify Workflow Variables with JS (#5946)
* Add variable support and engine configuration for JavaScript

Implemented handling of workflow variables in JavaScript expressions, including new handlers, notifications, and variable definitions. Enhanced type definition services and providers to include variable definitions, updated dependency injections, and applied modifications for improved backend API configuration.

* Add ObjectConverterHelper for JS object conversion

Implemented ObjectConverterHelper to convert .NET objects to JavaScript objects in EvaluateJavaScript context. Updated ConfigureEngineWithVariables handler to process and convert variables using the new helper utility.

* Add Customer and Order models and update Program.cs

Created new Customer and Order model classes in the Models namespace. Updated Program.cs to include and alias these models for use in the application.

* Add two new activities and integration test

Introduced `Activity1` and `Activity2` under `src/apps/Elsa.Server.Web/Activities`. Additionally, created a new integration test `VariablesInteropTests` to validate JavaScript variable modifications within workflows.

* Refactor to use IBookmarkQueue instead of IBookmarkResumer

Replaced IBookmarkResumer with IBookmarkQueue in various classes for enqueueing bookmark queue items. Added logging for better traceability and included additional helper imports for activity type name generation.

* Add correlationId tag to OpenTelemetry tracing

This change adds a correlationId tag to the tracing for workflow executions if the context contains a correlationId. This enhancement improves traceability and correlation across distributed systems.

* Set Correlation ID header in MassTransit messages

Added logic to set the "X-Correlation-ID" header in MassTransit messages if the CorrelationId is present. This ensures that the messages can be correlated properly across different parts of the system.

* Reduce logging verbosity in appsettings.json

Removed detailed debug logs for various Elsa workflows and middleware components from the appsettings.json. This change aims to streamline the log outputs, focusing on warnings and critical information to improve readability and debug efficiency.

* Add OpenTelemetry.Api package version 1.9.0

Include OpenTelemetry.Api to list of package versions in Directory.Packages.props. This addition aims to enhance application monitoring and observability.

* Add JavaScript variable handling integration test

Introduced integration tests for JavaScript activities to verify they can access and modify native variables. Added classes for data setup, test execution, and workflow definition with corresponding NUnit tests.

* Remove unused activities and models

Deleted several unused activity classes, models, and middleware to simplify the codebase. This cleanup helps reduce code complexity and improves maintainability. Updated Program.cs to reflect these deletions.

* Remove correlation ID header setting from dispatch

Simplified the workflow dispatching process by removing the redundant setting of the X-Correlation-ID header in two places. This change should improve code readability and maintainability.

* Format code block consistently

Corrected the indentation of the code block for better readability and consistency. This ensures all properties in the 'DispatchWorkflowInstance' initialization are properly aligned. No functional changes were made in this commit.

* Remove VariablesInteropTests.cs from integration tests

Deleted the VariablesInteropTests.cs file which contained a single test method testing JavaScript-to-JSON serialization. This cleanup removes unnecessary test code from the repository.
2024-09-06 18:03:47 +02:00
..
ActivityNotificationsMiddleware Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ActivityOutputs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
Blocking Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
BlockingAndBreaking Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
CanExecute Add Bookmark Queue and Restore Background Activity Execution (#5758) 2024-07-15 22:37:14 +02:00
Composites Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
CompositesAndOutcomes Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
CompositesPassingData Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
DependencyWorkflows Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
DependencyWorkflowsPublishing Multitenancy (#5159) 2024-06-10 21:30:53 +02:00
ExplicitJoins Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
FlowchartCompletion Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
FlowchartNextActivity Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
HttpRequestWithLiquid Add Bookmark Queue and Restore Background Activity Execution (#5758) 2024-07-15 22:37:14 +02:00
ImplicitJoins Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ImportAndExecute Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
Incidents Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
JavaScriptFunctions Add JS functions for encoding/decoding byte arrays from and to strings (#5902) 2024-08-14 17:43:35 +02:00
JavaScriptListsAndArrays Merge remote-tracking branch 'origin/patch/3.2.x' 2024-08-30 12:23:38 +02:00
JavaScriptNativeVariables Simplify Workflow Variables with JS (#5946) 2024-09-06 18:03:47 +02:00
JsonObjectSerialization Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
JsonObjectToObjectRemainsJsonObject Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ParentChildCompletion Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ParentChildInputs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
ParentChildOutputMapping Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
SetGetVariables Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
SetGetVariablesFromActivities Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
WorkflowCancellation Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
WorkflowOutputMapping Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
WorkflowResults Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00