Azure / LogicAppsUX

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

IBM host files action : Running trigger failed by showing server failure message and format of Input.Json contents copied in Rows parameters of the Action is getting changed #2904

Closed vgouth closed 10 months ago

vgouth commented 1 year ago

Describe the Bug with repro steps

1.Create a new workflow app using VS Code. 2.Create a stateful workflow 3.Add a HTTP trigger to the workflow and save the workflow 4.Add a "Generate Host File Contents" (from the IBM Host File SP) Action after the trigger 5.The Connection Parameters can (should) be left unchanged - or, if you like: 37 and unchecked. 6.For the first 2 parameters of the Action, enter: redefines.hidx (for the HIDX Name), "CUSTOMER_FILE_ROW" (for the Schema Name). 7.Open the attachment named InputJson.txt, copy the contents. In VS Code - the third Parameter Rows, has a button on the right enabling you to fill out all Input as a single value, click this. Delete the contents of the text box ("[ null ]" or similar) and then paste in the copied Input.Json contents. 8. Add a "Parse Host File Contents" Action, and fill out the first 2 Parameters as above (step 6). For the "Binary Contents" select the Dynamic content "Binary Contents" (which is the output of the previous step). 9.Add a response action as well - Http Response - for the Body, use the Dynamic content "Rows" (the output from the previous step). 10.Click on "Artifacts/Maps", right click - reveal in file explorer. Download the attachment "Redefines.hidx" into that directory. 11.Press F5/Run the Workflow

  1. Get the trigger URL by going to the "overview" page for the workflow.
  2. Expected Result : Run trigger should succeed and format of Input.Json contents copied in Rows parameters of the Action is should not change. Actual Result : Run trigger getting failed by showing server failure message and the format of Input.Json contents copied in Rows parameters of the Action is getting changed.

Input.Json contents. [ { "CUSTOMER_TYPE": "B", "SIMPLE_REDEFINITION1": { "BUSINESS": { "NAME": "ABC" } } }, { "CUSTOMER_TYPE": "P", "SIMPLE_REDEFINITION1": { "PERSONAL": { "NAME": { "FIRST_NAME": "Rob", "LAST_NAME": "BEA" } } } } ]

What type of Logic App Is this happening in?

Standard (Portal)

Are you using Preview Designer or GA Designer

Preview

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

No

Workflow JSON

{
  "definition": {
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "actions": {
      "Generate_Host_File_Contents": {
        "type": "ServiceProvider",
        "inputs": {
          "parameters": {
            "hidx": "redefines.hidx",
            "schema": "CUSTOMER_FILE_ROW",
            "rows": [
              [
                {
                  "CUSTOMER_TYPE": "B",
                  "SIMPLE_REDEFINITION1": {
                    "BUSINESS": {
                      "NAME": "ABC"
                    }
                  }
                },
                {
                  "CUSTOMER_TYPE": "P",
                  "SIMPLE_REDEFINITION1": {
                    "PERSONAL": {
                      "NAME": {
                        "FIRST_NAME": "Rob",
                        "LAST_NAME": "BEA"
                      }
                    }
                  }
                }
              ]
            ]
          },
          "serviceProviderConfiguration": {
            "connectionName": "hostfile",
            "operationId": "generateFileContents",
            "serviceProviderId": "/serviceProviders/hostfile"
          }
        },
        "runAfter": {}
      },
      "Parse_Host_File_Contents": {
        "type": "ServiceProvider",
        "inputs": {
          "parameters": {
            "hidx": "redefines.hidx",
            "schema": "CUSTOMER_FILE_ROW",
            "contents": "@body('Generate_Host_File_Contents')?['contents']"
          },
          "serviceProviderConfiguration": {
            "connectionName": "hostfile",
            "operationId": "parseFileContents",
            "serviceProviderId": "/serviceProviders/hostfile"
          }
        },
        "runAfter": {
          "Generate_Host_File_Contents": [
            "SUCCEEDED"
          ]
        }
      },
      "Response": {
        "type": "Response",
        "kind": "Http",
        "inputs": {
          "statusCode": 200,
          "body": "@body('Parse_Host_File_Contents')?['rows']"
        },
        "runAfter": {
          "Parse_Host_File_Contents": [
            "SUCCEEDED"
          ]
        }
      }
    },
    "contentVersion": "1.0.0.0",
    "outputs": {},
    "triggers": {
      "When_a_HTTP_request_is_received": {
        "type": "Request",
        "kind": "Http"
      }
    }
  },
  "connectionReferences": {
    "hostfile": {
      "connection": {
        "id": "/serviceProviders/hostfile/connections/hostfile"
      },
      "connectionName": "abc",
      "api": {
        "id": "/serviceProviders/hostfile"
      }
    }
  },
  "parameters": {}
}

Screenshots or Videos

image image

{ "code": "ServiceProviderActionFailed", "message": "The service provider action failed with error code 'ServiceOperationInvalidParameter' and error message 'The flat file processor based on HIDX: 'C:\home\site\wwwroot\Artifacts\Maps\redefines.hidx', and Schema: 'CUSTOMER_FILE_ROW' could not parse the input binary data. Error: 'Creation of record number: 0 failed. Description: 'HISMAGJ0044 When converting to host format parameter CUSTOMER_FILE_ROW in method PackIndependentStructure structure CUSTOMER_FILE_ROW was not of the expected type.'.'.'." }

Browser

Edge

Additional context

Environmental Details:

URL: https://aka.ms/emastagiLong-flowstip1

Version: 2.30701.1.1

AB#24438582

vgouth commented 11 months ago

Issue repro in latest VS code request

1.VS Code extension: vscode-azurelogicapps-2.45.3.vsix 2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzc2NDI0MDc0L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.31.2.nupkg 3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting 4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.31.2/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.31.2_any-any.zip

image image image

vgouth commented 11 months ago

Issue repro in the latest request

Environmental Details: URL: https://aka.ms/emastagiLong-flowstip1 Version: 2.30717.1.1

It is automatically adding the backslash n code in codeview.

image image

v-prakumar commented 11 months ago

@ccastrotrejo Issue is repro in the vsix 2.55.1 image

vgouth commented 11 months ago

Issue repro in the latest request:

Environmental Details: URL: https://aka.ms/emastagiLong-flowstip1 Version: 2.30731.1.4

Added code format is changing automatically into different format once workflow is save and run. image image

vgouth commented 10 months ago

Issue repro in the latest request

Environmental Details: URL: https://aka.ms/emastagiLong-flowstip1 Version: 2.30814.1.1

Added code format is changing automatically into different format once workflow is save and run.

image image

vgouth commented 10 months ago

Issue repro in the latest request.

1.VS Code extension - vscode-azurelogicapps-2.58.0.vsix 2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzc4MzA5NDU2L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.36.3.nupkg 3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting 4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.36.3/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.36.3_any-any.zip

image image

vgouth commented 10 months ago

Issue repro in the latest request

Environmental Details: URL: https://aka.ms/emastagiLong-flowstip1 Version: 2.30828.1.1

image

Added code format is changing automatically into different format once workflow is save and run. image

vgouth commented 10 months ago

@Eric-B-Wu . Please find the attached video for your reference. And attaching the redefines.hidx file as well.

https://github.com/Azure/LogicAppsUX/assets/113517384/f4851e93-cabb-4d32-b606-3b32c5c30d16

https://github.com/Azure/LogicAppsUX/assets/113517384/5a2cd224-b3c0-4d59-adfd-28941162a1de

https://github.com/Azure/LogicAppsUX/assets/113517384/898c06f3-8116-4b6f-8b1f-c1db1a7d66ac

Redefines.zip

vgouth commented 10 months ago

@Eric-B-Wu Issue resolved once got connected with you. Thank you for your time on this .