diff --git a/src/ReC.Application/RecActions/Commands/InvokeRecActionViewCommand.cs b/src/ReC.Application/RecActions/Commands/InvokeRecActionViewCommand.cs
index 3f190f3..fa044a2 100644
--- a/src/ReC.Application/RecActions/Commands/InvokeRecActionViewCommand.cs
+++ b/src/ReC.Application/RecActions/Commands/InvokeRecActionViewCommand.cs
@@ -18,12 +18,12 @@ namespace ReC.Application.RecActions.Commands;
public record InvokeRecActionViewCommand : IRequest
{
public RecActionViewDto Action { get; set; } = null!;
- public InvokeReferencesDto? References { get; set; }
+ public required InvokeReferencesDto References { get; set; }
}
public record InvokeReferencesDto
{
- public string? BatchId { get; init; }
+ public required string BatchId { get; init; }
public string? Reference1 { get; init; }
public string? Reference2 { get; init; }
public string? Reference3 { get; init; }
diff --git a/src/ReC.Client/Api/RecActionApi.cs b/src/ReC.Client/Api/RecActionApi.cs
index a326aa5..02fd898 100644
--- a/src/ReC.Client/Api/RecActionApi.cs
+++ b/src/ReC.Client/Api/RecActionApi.cs
@@ -24,13 +24,25 @@ namespace ReC.Client.Api
/// Optional reference values to pass through to all result records.
/// A token to cancel the operation.
/// if the request succeeds; otherwise, .
- public async Task InvokeAsync(int profileId, InvokeReferences references = null, CancellationToken cancellationToken = default)
+ public async Task InvokeAsync(int profileId, InvokeReferences references, CancellationToken cancellationToken = default)
{
var content = references != null ? ReCClientHelpers.ToJsonContent(references) : null;
var resp = await Http.PostAsync($"{ResourcePath}/invoke/{profileId}", content, cancellationToken);
return resp.IsSuccessStatusCode;
}
+ ///
+ /// Invokes a ReC action for the specified profile.
+ ///
+ /// The profile identifier.
+ /// Batch identifier.
+ /// A token to cancel the operation.
+ /// if the request succeeds; otherwise, .
+ public Task InvokeAsync(int profileId, string batchId, CancellationToken cancellationToken = default)
+ {
+ return InvokeAsync(profileId, new InvokeReferences() { BatchId = batchId }, cancellationToken);
+ }
+
///
/// Retrieves Rec actions.
///