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

Stateful Logic App Peek Lock Trigger skips run history for malformed JSON messages with Content-Type 'application/json #1235

Open
bahto opened this issue Nov 15, 2024 · 1 comment

Comments

@bahto
Copy link

bahto commented Nov 15, 2024

Describe the Bug with repro steps

Bug Report:

"Stateful Logic App Peek Lock Trigger skips run history for malformed JSON messages with Content-Type 'application/json'"


Steps to Reproduce:

  1. Configure the Logic App:

Create a stateful Logic App workflow with the following steps:

  • Trigger: "When a message is received in a queue (Peek Lock)" (In-app Service Bus).
  • Action: "Complete message".
  1. Place a message on the queue:

    Use a message with the following characteristics:

    • Body: Malformed JSON, for example:
    {
        "specversion": "1.0",
        "type": "sourceSystem.event.customer.created",
        "source": "sourceSystem",
        "subject": "a089V00000L9XXXXXX",
        "id": "a089V00000LXXXXXXX",
        "time": "",
        "datacontenttype": "application/json",
        "data": 
     }
    • Content-Type : application/json.
  2. Observe the behavior:

    • The message is processed under the hood and moved to the Dead Letter Queue (DLQ).
    • No run history is displayed in the Logic App, even though the message was processed.
  3. Test with a different configuration:

    Place a similar message on the queue, but leave the Content-Type header empty or remove it.

    • In this case, the Logic App run history does display the processing correctly.

Expected Behavior:

The Logic App run history should always be visible, regardless of whether the JSON message is malformed or not, as long as the trigger processes the message.

What type of Logic App Is this happening in?

Standard (Portal)

Which operating system are you using?

Windows

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "Compose": {
                "type": "Compose",
                "inputs": "@triggerBody()?['contentData']",
                "runAfter": {}
            },
            "Complete_the_message_in_a_queue": {
                "type": "ServiceProvider",
                "inputs": {
                    "parameters": {
                        "queueName": "sampleq1",
                        "lockToken": "@triggerBody()?['lockToken']"
                    },
                    "serviceProviderConfiguration": {
                        "connectionName": "serviceBus",
                        "operationId": "completeQueueMessageV2",
                        "serviceProviderId": "/serviceProviders/serviceBus"
                    }
                },
                "runAfter": {
                    "Compose": [
                        "SUCCEEDED"
                    ]
                }
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "When_messages_are_available_in_a_queue_(peek-lock)": {
                "type": "ServiceProvider",
                "inputs": {
                    "parameters": {
                        "queueName": "sampleq1"
                    },
                    "serviceProviderConfiguration": {
                        "connectionName": "serviceBus",
                        "operationId": "peekLockQueueMessagesV2",
                        "serviceProviderId": "/serviceProviders/serviceBus"
                    }
                },
                "splitOn": "@triggerOutputs()?['body']"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

No response

Browser

Chrome

Additional context

No response

@hartra344
Copy link
Collaborator

Moving this to the backend issue repo. If this is affecting an production environments for you, I would highly recommend opening a support ticket for quicker responses.

@hartra344 hartra344 transferred this issue from Azure/LogicAppsUX Nov 15, 2024
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

2 participants