Posts

Showing posts with the label Azure Logic App Error

Selected file must be between 1 and 2097152 bytes

Image
For a POC -  Getting Started with Logic Apps - EDI X12 to XML , I had to use an xml schema and EDI 850 schema and map between them and use them in Logic App.  We use Integration account to store this artifacts, but when loading EDI schema (I missed to check the size)  got below error                             "Selected file 'X12_00504_850.xsd' must be between 1 and 2097152 bytes . " Why it happened Actually  I missed to check the size before uploading the schema and should have choose another option - Large File. However, w hen dealing with EDI schemas (X12,EDIFACT etc), you will often see that the size of schemas are in mb’s and it is because lot of annotations are part of it. And  Integration Account currently doesn’t support big size files ( In my view, the only reason it is so - so as to push users to go for storage account ;)  ) Wha...

SplitOn property doesn't validate expression at design time

Image
While working on a POC about Debatching in Logic Apps using SplitOn ,    I was encountered with an below error when tried to test the workflow                               { "error": { "code": "InvalidTemplate", "message": "The template language expression evaluation failed: 'The template language expression 'triggerBody()[‘PurchaseOrders’][‘PurchaseOrder’]' is not valid: the string character '‘' at position '14' is not expected.'." } } Why it happened The error points out to the expression having invalid character in it at position 14 i.e. the single quote.  First thought was -  if that is the case then Logic app designer should have stopped me from saving the workflow (Design time validation), but it did not. And when request was posted to it, logic app runtime gave the error.  Struggled a bit with resolving this and it happened to be a chara...

The workflow with 'Response' action type should not have triggers with 'splitOn' property

Image
While working on a POC about Debatching in Logic Apps using SplitOn ,    I was encountered with an below error when tried to add Response action in the workflow                             " Failed to save logic app DebatchXMLUsingSplitON. The workflow with 'Response' action type should not have triggers with 'splitOn' property defined: 'manual'. " Why it happened As I had to debatch an xml message, following xpath expression was provided to splitOn property xpath(xml(triggerBody()),'//*[local-name()="PurchaseOrder"  and namespace-uri() ="http://www.adventure-works.com"]' ) So this property will make logic app to instantiate equivalent number of the instances as that of number of splitted message. Say, a batched message with 3 messages in it is posted to this Logic App, then 3 instances of logic app gets created. And this is the reason, why designe...

The template language function 'xpath' expects its first parameter to be an XML object

Image
While working on a POC about Debatching in Logic Apps using For Each ,    I was encountered with an below error when testing it " InvalidTemplate. Unable to process template language expressions for action 'For_each' at line '1' and column '1658': 'The template language function 'xpath' expects its first parameter to be an XML object. The provided value is of type 'String'. Please see https://aka.ms/logicexpressions#xpath for usage details.'. " Why it happened As I had to debatch an xml message, following xpath expression was provided to ForEach action xpath(triggerBody(),'//*[local-name()="PurchaseOrder" and namespace-uri()="http://www.adventure-works.com"]') And when xml message was posted, the logic app was not able to apply xpath on the triggerbody It happened because triggerBody() is an Azure Workflow built-in FUNCTION, which is used to access the ou...

The request has both SAS authentication scheme and 'Bearer' authorization scheme. Only one scheme should be used

Image
While doing testing after doing a POC on Securing Logic App with Azure Active Directory authentication , where I have put logic app behind APIM and before passing the request to logic app, apim does validation of the token.  I was encountered with an error "The request has both SAS authentication scheme and 'Bearer' authorization  scheme.  Only one scheme should be used." Why it happened After validating the token which is part of the header i.e. Authorization, APIM forwards the request as it is to backend. As  Logic app is configured as  back end , it's url already consist of SAS signature plus the request also has Authorization section and this is the problem. By default every request endpoint on a logic app has a Shared Access Signature (SAS) in the endpoint's URL, which follows this format: https://<request-endpoint-URI>sp=<permissions>sv...

The template language expression 'xxx' cannot be evaluated because property 'xxx' doesn't exist. Property selection is not supported on content of type 'application/xml'

Image
While doing a POC -  Getting Started with Logic Apps - What happened to the Request? I tried to use the orderID node's value in the subject of the send email action from the triggerBody(),t he message to trigger logic app is as below <purchaseOrder>     <orderID>PO0029</orderID>     <orderDate>2019-07-20</orderDate>     <description>Discount applied on the Order</description>     <shipTo>         <name>Mike Taylor</name>         <street>MG Road</street>         <city>Pune</city>         <state>MH</state>         <pin>410701</pin>         <country>India</country>   ...