Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Code fails with Transform XML #1191

Open
TorW opened this issue Oct 4, 2024 · 1 comment
Open

Custom Code fails with Transform XML #1191

TorW opened this issue Oct 4, 2024 · 1 comment

Comments

@TorW
Copy link

TorW commented Oct 4, 2024

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"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:value-of select="Test"/> </xsl:template> </xsl:stylesheet>

Add a Compose action with this input:
<Test>value</Test>

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

{
    "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": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Test>value</Test>",
                "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

Additional context

No response

@TorW
Copy link
Author

TorW commented Oct 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant