mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET Workflows - Capture the identifier of the LastMessage (the workflow input) (#1372)
* Fixed * Test fix
This commit is contained in:
+1
@@ -15,6 +15,7 @@ namespace Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests;
|
||||
public sealed class DeclarativeCodeGenTest(ITestOutputHelper output) : WorkflowTest(output)
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("CheckSystem.yaml", "CheckSystem.json")]
|
||||
[InlineData("SendActivity.yaml", "SendActivity.json")]
|
||||
[InlineData("InvokeAgent.yaml", "InvokeAgent.json")]
|
||||
[InlineData("InvokeAgent.yaml", "InvokeAgent.json", true)]
|
||||
|
||||
+1
@@ -15,6 +15,7 @@ namespace Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests;
|
||||
public sealed class DeclarativeWorkflowTest(ITestOutputHelper output) : WorkflowTest(output)
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("CheckSystem.yaml", "CheckSystem.json")]
|
||||
[InlineData("SendActivity.yaml", "SendActivity.json")]
|
||||
[InlineData("InvokeAgent.yaml", "InvokeAgent.json")]
|
||||
[InlineData("InvokeAgent.yaml", "InvokeAgent.json", true)]
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"description": "Send an activity message.",
|
||||
"setup": {
|
||||
"input": {
|
||||
"type": "String",
|
||||
"value": "Everything good?"
|
||||
}
|
||||
},
|
||||
"validation": {
|
||||
"conversation_count": 1,
|
||||
"min_action_count": 2,
|
||||
"max_action_count": -1,
|
||||
"min_response_count": 0,
|
||||
"actions": {
|
||||
"start": [
|
||||
"check_system"
|
||||
],
|
||||
"final": [
|
||||
"activity_passed",
|
||||
"check_system_Post"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
kind: Workflow
|
||||
trigger:
|
||||
|
||||
kind: OnConversationStart
|
||||
id: workflow_test
|
||||
actions:
|
||||
|
||||
- kind: ConditionGroup
|
||||
id: check_system
|
||||
conditions:
|
||||
|
||||
- condition: =IsBlank(System.Conversation)
|
||||
id: conversation_check
|
||||
actions:
|
||||
- kind: EndDialog
|
||||
id: conversation_bad
|
||||
|
||||
- condition: =IsBlank(System.Conversation.Id)
|
||||
id: conversation_id_check1
|
||||
actions:
|
||||
- kind: EndDialog
|
||||
id: conversation_id_bad1
|
||||
|
||||
- condition: =IsBlank(System.ConversationId)
|
||||
id: conversation_id_check2
|
||||
actions:
|
||||
- kind: EndDialog
|
||||
id: conversation_id_bad2
|
||||
|
||||
- condition: =IsBlank(System.LastMessage)
|
||||
id: message_check
|
||||
actions:
|
||||
- kind: EndDialog
|
||||
id: message_bad
|
||||
|
||||
- condition: =IsBlank(System.LastMessage.Id)
|
||||
id: message_id_check1
|
||||
actions:
|
||||
- kind: EndDialog
|
||||
id: message_id_bad1
|
||||
|
||||
- condition: =IsBlank(System.LastMessageId)
|
||||
id: message_id_check2
|
||||
actions:
|
||||
- kind: EndDialog
|
||||
id: message_id_bad2
|
||||
|
||||
- condition: =IsBlank(System.LastMessageText)
|
||||
id: message_text_check
|
||||
actions:
|
||||
- kind: EndDialog
|
||||
id: message_text_bad
|
||||
|
||||
elseActions:
|
||||
- kind: SendActivity
|
||||
id: activity_passed
|
||||
activity: PASSED!
|
||||
Reference in New Issue
Block a user