Azure / logicapps

Azure Logic Apps labs, samples, and tools
MIT License
366 stars 302 forks source link

Custom Code fails with Transform XML #1191

Open TorW opened 1 week ago

TorW commented 1 week ago

Describe the Bug

If i add a Transform XML Action in a Logic app which uses custom code local function (.NET 8), it fails with this error: Result: Failure Exception: System.InvalidOperationException: Method 'Run' specified in EntryPoint was not found. This function cannot be created.

Plan Type

Standard

Steps to Reproduce the Bug or Issue

Create a new workspace with custom code (.NET 8).

Add a xslt under Artifacts/Maps (i used this simple xslt): `<?xml version="1.0" encoding="UTF-8"?>

` Add a Compose action with this input: `value` Add a XML Transform in the workflow after Compose and use output of Compose as Content. Set Transfomr Options to Generate text output. Debug the logic app and it should fail. ### Workflow JSON ```json { "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "Call_a_local_function_in_this_logic_app": { "type": "InvokeFunction", "inputs": { "functionName": "Helper", "parameters": { "zipCode": 85396, "temperatureScale": "Celsius" } }, "runAfter": { "Transform_XML": [ "SUCCEEDED" ] } }, "Response": { "type": "Response", "kind": "http", "inputs": { "statusCode": 200, "body": "@body('Call_a_local_function_in_this_logic_app')" }, "runAfter": { "Call_a_local_function_in_this_logic_app": [ "Succeeded" ] } }, "Transform_XML": { "type": "Xslt", "inputs": { "content": "@outputs('Compose')", "map": { "source": "LogicApp", "name": "test.xslt" }, "transformOptions": "GenerateTextOutput" }, "runAfter": { "Compose": [ "SUCCEEDED" ] } }, "Compose": { "type": "Compose", "inputs": "\nvalue", "runAfter": {} } }, "triggers": { "When_a_HTTP_request_is_received": { "type": "Request", "kind": "Http" } }, "contentVersion": "1.0.0.0", "outputs": {} }, "kind": "Stateful" } ``` ### Screenshots or Videos ![Screenshot 2024-10-04 104757](https://github.com/user-attachments/assets/19d117f7-7b78-48b2-87bf-55ab4d91afc1) ### Additional context _No response_
TorW commented 1 week ago

An update for this. It seems that the workflow and call on local function actually works, with this error in the terminal.