Files
Peter Ibekwe 988ef6a50e .NET: Support InvokeFunctionTool for declarative workflows (#4014)
* Initial Implementation of InvokeFunctionTool

* Added unit test for InvokeFunctionTool executor.

* Implemented unit and integration tests for InvokeFunctionTool.

* Add sample for InvokeFunctionTool in declarative workflows.

* Remove unused sample and updated comments.

* Updating to official OM release with InvokeFunctionTool

* Fix formatting issues.

* Updated PowerFx version

* Update test fixture

* Cleanup - Removed unused method in InvokeFunctionToolExecutor

* Update test based on PR feedback.

* Update based on PR comments
2026-02-18 23:15:36 +00:00

34 lines
925 B
YAML

#
# This workflow tests invoking function tools with approval requirement.
# Uses the MenuPlugin function: GetItemPrice with requireApproval: true
#
kind: Workflow
trigger:
kind: OnConversationStart
id: workflow_invoke_function_tool_approval_test
actions:
# Set the item name we want to look up
- kind: SetVariable
id: set_item_name
variable: Local.ItemName
value: Clam Chowder
# Invoke GetItemPrice function with approval requirement
- kind: InvokeFunctionTool
id: invoke_get_item_price
functionName: GetItemPrice
conversationId: =System.ConversationId
requireApproval: true
arguments:
name: =Local.ItemName
output:
autoSend: false
result: Local.ItemPrice
# Send the result as an activity
- kind: SendMessage
id: show_price_result
message: "The price of {Local.ItemName} is ${Text(Local.ItemPrice)}"