.NET Workflows -Fix Declarative Workflow Tests (#1065)

* Fixed

* Restore generated workflow

* Project

* Fine tune

* Update baseline

* Adjust test-case
This commit is contained in:
Chris
2025-10-01 16:15:46 +00:00
committed by GitHub
parent dc9d1a6280
commit f5ca4f42c0
10 changed files with 49 additions and 41 deletions
@@ -12,7 +12,10 @@ internal sealed class <#= this.Name #>Executor(FormulaSession session, WorkflowA
protected override async ValueTask<object?> ExecuteAsync(IWorkflowContext context, CancellationToken cancellationToken)
{<#
EvaluateStringExpression(this.Model.ConversationId, "conversationId", isNullable: true); #>
ArgumentNullException.ThrowIfNull(conversationId, nameof(conversationId));
if (string.IsNullOrWhiteSpace(conversationId))
{
throw new DeclarativeActionException($"Conversation identifier must be defined: {this.Id}");
}
ChatMessage newMessage = new(ChatRole.<#= FormatEnum(this.Model.Role, RoleMap) #>, [.. this.GetContentAsync(context).ToEnumerable()]) { AdditionalProperties = this.GetMetadata() };
await agentProvider.CreateMessageAsync(conversationId, newMessage, cancellationToken).ConfigureAwait(false);<#
AssignVariable(this.Message, "newMessage");