Refactor query behaviors for execution tracking

Refactored `BodyQueryBehavior` and `HeaderQueryBehavior` to introduce explicit execution tracking with new properties (`BodyQueryExecuted` and `HeaderQueryExecuted`). Updated `RecActionDto` to include computed properties (`IsBodyQueryReturnedNoData` and `IsHeaderQueryReturnedNoData`) for clearer null-checking logic. Removed the `IsReturnedNoData` tuple for simplicity.

Updated `InvokeRecActionCommandHandler` to use the new `IsBodyQueryReturnedNoData` property. Improved logging for better diagnostics and clarified handling of null results in query behaviors.
This commit is contained in:
2025-12-01 10:10:41 +01:00
parent 29f0a82f0f
commit 90e2460716
4 changed files with 14 additions and 7 deletions

View File

@@ -54,13 +54,19 @@ public record RecActionDto
public string? HeaderQuery { get; init; }
public bool HeaderQueryExecuted { get; set; } = false;
public bool IsHeaderQueryReturnedNoData => HeaderQueryExecuted && HeaderQuery is null;
public Dictionary<string, string>? Headers { get; set; }
public string? BodyQuery { get; init; }
public string? Body { get; set; }
public (bool BodyQuery, bool HeaderQuery) IsReturnedNoData = (false, false);
public bool BodyQueryExecuted { get; set; } = false;
public bool IsBodyQueryReturnedNoData => BodyQueryExecuted && Body is null;
public string? PostprocessingQuery { get; init; }