elsa-core/src/modules/Elsa.Workflows.Api/Endpoints
Sipke Schoorstra e8cd3cded5
Implement Activity Testing API (#6719)
* Adds activity test-run endpoint

Adds an API endpoint to facilitate testing of individual activities within a workflow.

The endpoint allows developers to execute a specific activity within a given workflow definition.

Also ensures latest workflow definition is marked when publishing.

* Enables activity test run to return results

Updates the activity test run endpoint to return activity execution results such as outputs, outcomes, exceptions, and status.

This allows users to inspect the results of test runs for activities, providing valuable insights into their behavior.

* Add activity testing API integration and activity test UI support

Introduced `ITestsApi` and supporting models for activity testing in workflows. Updated the UI to support triggering and displaying activity test results, including handling outcomes, outputs, exceptions, and status. Additionally, updated dependency injection for the new API and adjusted the project references.

* Refactor workflow test endpoints and update method parameters

Updated the namespace and route for activity test endpoints from `TestRun` to `Tests/Activities`. Adjusted default parameter values in `WorkflowDefinitionHandle` method for improved consistency.

* Introduce `ActivityTestRunner` to streamline activity testing

Adds a new `IActivityTestRunner` interface and its implementation, simplifying the execution of individual workflow activities for testing purposes. Updates dependencies and refactors activity test endpoints to use the new service.

* Update `ActivityTestRunner` to support variable test values

Enhanced the `ActivityTestRunner` to include functionality for injecting test-specific variable values when executing workflow activities. Added a helper method `GetVariableTestValues` to retrieve and deserialize test variable data from custom properties.

* Update `Tests/Activities` endpoint to include `ActivityState`

Refactored the response model to replace `Outcomes` with `ActivityState` and `Payload`, ensuring more detailed activity execution results.

* Add draft saving and saved notifications for workflow definitions

* Add draft saving notification handling in cache evictions

Integrates handling for `WorkflowDefinitionDraftSaving` and `WorkflowDefinitionDraftSaved` events within the workflow cache eviction service, ensuring definitions are properly evicted.

* Refactor `ConfigureLiquidEngine` to simplify variable enumeration logic

* Remove redundant `<returns>` tag from `ByDefinitionVersionId` method XML documentation

* Refactor `Tests/Activities` endpoint documentation and constructor

Updated XML documentation to clarify endpoint responsibilities and adjusted constructor by removing an unused dependency (`IIdentityGenerator`).
2025-06-23 10:03:10 +02:00
..
ActivityDescriptorOptions/Get Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
ActivityDescriptors Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
ActivityExecutions Implement retry attempt capturing (#6674) 2025-05-26 11:47:09 +02:00
ActivityExecutionSummaries/ListSummaries Implement multitenant HTTP routing (#6031) 2024-10-14 21:27:11 +02:00
CommitStrategies Refactor commit strategies API to unify descriptor model. 2025-01-30 18:32:15 +01:00
Events Fix race condition in Distributed Workflow Runtime during same-workflow event publishing (#6538) 2025-03-31 18:11:27 +02:00
Features
IncidentStrategies/List Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
LogPersistenceStrategies/List Introduce Log Persistence Strategy (#6057) 2024-10-25 19:41:10 +02:00
Package
Scripting/ExpressionDescriptors/List Global read-only and read-only workflows (#5406) 2024-05-27 10:06:39 +02:00
StorageDrivers/List Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
Tasks/Complete Multitenancy (#5159) 2024-06-10 21:30:53 +02:00
Tests/Activities Implement Activity Testing API (#6719) 2025-06-23 10:03:10 +02:00
VariableTypes/List Global read-only and read-only workflows (#5406) 2024-05-27 10:06:39 +02:00
WorkflowActivationStrategies/List Update namespaces and correct merge artefacts 2024-10-11 20:41:49 +02:00
WorkflowDefinitions Merge branch 'main' into enh/workflowinstance-name 2025-03-14 23:03:33 +01:00
WorkflowInstances Support for Writing Custom Trigger Activities Using Existing Trigger Infrastructure (#6527) 2025-03-21 23:16:56 +01:00