Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
76 stars 81 forks source link

Invalid parameters appear when nested parameters are present in action input #4020

Closed siddharth-ms closed 5 months ago

siddharth-ms commented 9 months ago

Describe the Bug with repro steps

  1. [Internal] Open sid-sap-testbox.ui-test in BTS4
  2. Create [RFC] Call function in SAP in-app action
  3. Set the Input Type to Custom
  4. Then select the optional RFC Name, and set it as STFC_CONNECTION
  5. A new dynamic textbox appear REQTEXT, enter Hello in that
  6. Check save. - This experience is great.

image

  1. Now refresh the page, or go to code view and then back to designer
  2. Open the same action - A new parameter body will appear that was not part of the input when the action was first authored

image

What type of Logic App Is this happening in?

Standard (Portal)

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": {
            "[RFC]_Call_function_in_SAP": {
                "inputs": {
                    "parameters": {
                        "body": {
                            "REQUTEXT": "Hello"
                        },
                        "inputBodyType": "Custom",
                        "outputBodyType": "XML",
                        "rfcGroupFilter": "*",
                        "rfcName": "STFC_CONNECTION"
                    },
                    "serviceProviderConfiguration": {
                        "connectionName": "sap",
                        "operationId": "callRfc",
                        "serviceProviderId": "/serviceProviders/sap"
                    }
                },
                "runAfter": {},
                "type": "ServiceProvider"
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "triggers": {
            "When_a_HTTP_request_is_received": {
                "kind": "Http",
                "type": "Request"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

No response

Browser

Edge

Additional context

No response

preetriti1 commented 5 months ago

@siddharth-ms - The manifest is incorrect and that is why it behaves weirdly with the dynamic inputs. image

You cannot have x-ms-dynamic-properties defined and also have some static properties for the same object. if any property has x-ms-dynamic-properties defined, then the dynamic call should result in replacing that whole property schema. This is the same case both for manifest based operations and swagger based operations. You can defined another property and mark that as dynamicproperties and it should be working fine. You might have to change the location of your inputs for runtime... but that is how we have all manifests defined today.

If you need to discuss more, please set up time with me. I am closing with this comment