elsa-core/src/common/Elsa.Testing.Shared.Integration/TestWorkflow.cs
Sipke Schoorstra 7fadf51be6
Fix Output Persistence of Async Activities (#6542)
* Updated output handling of asynchronously run workflows to be the same as when run synchronously

* updated tests

* Refactor activity execution mapping and output persistence

Introduced `GetPersistableOutputAsync` in `IActivityExecutionMapper` to streamline output persistence logic. Refactored the handling of activity persistence properties, replacing repetitive code with reusable methods. Removed unused dependencies and redundant methods, optimizing code readability and maintainability.

* Remove docker-compose-datadog.yml from solution file.

The docker-compose-datadog.yml file is no longer included in the solution structure. This change cleans up unused references to ensure the solution remains consistent and up-to-date.

* Refactor workflow extensions and add new utilities

Split and reorganize workflow-related extension methods into `RunActivityExtensions` and `RunWorkflowExtensions` for better modularity. Removed deprecated methods from `ServiceProviderExtensions`. Updated tests and usages to reflect these changes.

---------

Co-authored-by: Bob Hauser <rhauser@kinaxis.com>
2025-04-01 07:53:00 +02:00

23 lines
557 B
C#

using Elsa.Workflows;
namespace Elsa.Testing.Shared;
public class TestWorkflow : WorkflowBase
{
private readonly Action<IWorkflowBuilder> _buildWorkflow;
public TestWorkflow(Action<IWorkflowBuilder> buildWorkflow)
{
_buildWorkflow = buildWorkflow;
}
protected override void Build(IWorkflowBuilder workflowBuilder)
{
_buildWorkflow(workflowBuilder);
if (string.IsNullOrEmpty(workflowBuilder.Id))
{
workflowBuilder.Id = Guid.NewGuid().ToString();
}
}
}