You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before you send XML content to a business partner in a business-to-business (B2B) scenario, you might want to encode that content first. If you receive encoded XML content, you'll need to decode that content first. When you're building a logic app workflow in Azure Logic Apps, you can encode and decode flat files by using the **Flat File** built-in connector actions and providing a schema to use for encoding and decoding. You can use **Flat File** actions in multi-tenant Consumption logic app workflows and single-tenant Standard logic app workflows.
17
+
Before you send XML content to a business partner in a business-to-business (B2B) scenario, you might want to encode that content first. If you receive encoded XML content, you'll need to decode that content first. When you're building a logic app workflow in Azure Logic Apps, you can encode and decode flat files by using the **Flat File** built-in connector actions and a flat file schema for encoding and decoding. You can use **Flat File** actions in multi-tenant Consumption logic app workflows and single-tenant Standard logic app workflows.
18
18
19
19
> [!NOTE]
20
20
>
@@ -24,10 +24,15 @@ While no **Flat File** triggers are available, you can use any trigger or action
24
24
25
25
This article shows how to add the **Flat File** encoding and decoding actions to your workflow.
26
26
27
+
* Upload the flat file schema to your integration account for Consumption logic app workflows or to your Standard logic app resource for use in any child workflow.
28
+
* Add a **Flat File** encoding or decoding action to your workflow.
29
+
* Select the schema that you want to use.
30
+
27
31
For more information, review the following documentation:
28
32
29
33
*[Consumption versus Standard logic apps](logic-apps-overview.md#resource-type-and-host-environment-differences)
*[[schema](logic-apps-enterprise-integration-schemas.md) for encoding and decoding the XML content.
31
36
*[Built-in connectors overview for Azure Logic Apps](../connectors/built-in.md)
32
37
*[Managed or Azure-hosted connectors in Azure Logic Apps](/connectors/connector-reference/connector-reference-logicapps-connectors)
33
38
@@ -45,7 +50,22 @@ For more information, review the following documentation:
45
50
46
51
*[Create a Standard logic app workflow with single-tenant Azure Logic Apps](create-single-tenant-workflows-azure-portal.md)
47
52
48
-
* The flat file [schema](logic-apps-enterprise-integration-schemas.md) to use for encoding and decoding the XML content.
53
+
* A flat file schema for encoding and decoding the XML content.
54
+
55
+
To create schemas, you can use the following tools:
56
+
57
+
* Visual Studio 2019 and the [Microsoft Azure Logic Apps Enterprise Integration Tools Extension](https://aka.ms/vsenterpriseintegrationtools).
58
+
59
+
* Visual Studio 2015 and the [Microsoft Azure Logic Apps Enterprise Integration Tools for Visual Studio 2015 2.0 extension](https://aka.ms/vsmapsandschemas).
60
+
61
+
> [!NOTE]
62
+
>
63
+
> * Don't install the extension alongside the BizTalk Server extension. Having both extensions might
64
+
> produce unexpected behavior. Make sure that you only have one of these extensions installed.
65
+
>
66
+
> * On high resolution monitors, you might experience a display problem with the map designer in
67
+
> Visual Studio. To resolve this display problem, either restart Visual Studio in DPI-unaware mode,
68
+
> or add the DPIUNAWARE registry value.
49
69
50
70
* Based on whether you're working on a Consumption or Standard logic app workflow, you'll need an [integration account resource](logic-apps-enterprise-integration-create-integration-account.md). Usually, you need this resource when you want to define and store artifacts for use in enterprise integration and B2B workflows.
51
71
@@ -61,67 +81,59 @@ For more information, review the following documentation:
61
81
62
82
* Some Azure-hosted integration account connectors, such as AS2, EDIFACT, and X12, let you create a connection to your integration account. If you're just using these connectors, you don't need the link.
63
83
64
-
* The built-in connectors named **Flat File**and **Liquid** let you select schemas and maps that you previously uploaded to your logic app resource or to a linked integration account, but not both. You can then use these artifacts across all child workflows within the same logic app resource.
84
+
* The **Flat File**built-in connector lets you select a schema that you previously uploaded to your logic app resource or to a linked integration account, but not both. You can then use this artifact across all child workflows within the same logic app resource.
65
85
66
-
So, if you don't have or need an integration account, you can use the upload option. Otherwise, you can use the linking option. Either way, you can use these artifacts across all child workflows within the same logic app resource.
86
+
So, if you don't have or need an integration account, you can use the upload option. Otherwise, you can use the linking option. Either way, you can use these artifacts across all child workflows within the same logic app resource.
67
87
88
+
## Limitations
68
89
69
-
*An [integration account resource](logic-apps-enterprise-integration-create-integration-account.md) where you define and store artifacts, such as trading partners, agreements, certificates, and so on, for use in your enterprise integration and B2B workflows. This resource has to meet the following requirements:
90
+
*In your flat file schema, make sure the contained XML groups don't have excessive numbers of the `max count` property set to a value *greater than 1*. Avoid nesting an XML group with a `max count` property value greater than 1 inside another XML group with a `max count` property greater than 1.
70
91
71
-
* Is associated with the same Azure subscription as your logic app resource.
92
+
* When Azure Logic Apps parses the flat file schema, and whenever the schema allows the choice of the next fragment, Azure Logic Apps generates a *symbol* and a *prediction* for that fragment. If the schema allows too many such constructs, for example, more than 100,000, the schema expansion becomes excessively large, which consumes too much resources and time.
72
93
73
-
* Exists in the same location or Azure region as your logic app resource.
94
+
## Upload schema
74
95
75
-
* If you're using the [**Logic App (Consumption)** resource type](logic-apps-overview.md#resource-type-and-host-environment-differences), your integration account requires the following items:
96
+
After you create your schema, you now have to upload the schema based on the following scenario:
76
97
77
-
* The flat file [schema](logic-apps-enterprise-integration-schemas.md) to use for encoding or decoding the XML content.
98
+
* If you're working on a Consumption logic app workflow, [upload your template to your integration account](#upload-schema-integration-account).
78
99
79
-
* A [link to your logic app resource](logic-apps-enterprise-integration-create-integration-account.md#link-account).
100
+
If you're working on a Standard logic app workflow, you can [upload your schema to your integration account](#upload-schema-integration-account), or [upload your schema to your logic app resource](#upload-schema-standard-logic-app).
80
101
81
-
* If you're using the [**Logic App (Standard)** resource type](logic-apps-overview.md#resource-type-and-host-environment-differences), you don't store schemas in your integration account. Instead, you can [directly add schemas to your logic app resource](logic-apps-enterprise-integration-schemas.md) using either the Azure portal or Visual Studio Code. You can then use these schemas across multiple workflows within the *same logic app resource*.
102
+
<aname="upload-schema-integration-account"></a>
82
103
83
-
You still need an integration account to store other artifacts, such as partners, agreements, and certificates, along with using the [AS2](logic-apps-enterprise-integration-as2.md), [X12](logic-apps-enterprise-integration-x12.md), and [EDIFACT](logic-apps-enterprise-integration-edifact.md) operations. However, you don't need to link your logic app resource to your integration account, so the linking capability doesn't exist. Your integration account still has to meet other requirements, such as using the same Azure subscription and existing in the same location as your logic app resource.
104
+
### Upload schema to integrationaccount
84
105
85
-
> [!NOTE]
86
-
> Currently, only the **Logic App (Consumption)** resource type supports [RosettaNet](logic-apps-enterprise-integration-rosettanet.md) operations.
87
-
> The **Logic App (Standard)** resource type doesn't include [RosettaNet](logic-apps-enterprise-integration-rosettanet.md) operations.
88
106
89
-
## Limits
107
+
<aname="upload-schema-standard-logic-app"></a>
90
108
91
-
Make sure that the contained XML groups in the flat file schema that you generate doesn't have excessive numbers of the `max count` property set to a value *greater than 1*. Avoid nesting an XML group with a `max count` property value greater than 1 inside another XML group with a `max count` property greater than 1.
109
+
### Upload schema to Standard logic app
92
110
93
-
Each time that the flat file schema allows the choice of the next fragment, the Azure Logic Apps engine that parses the schema generates a *symbol* and a *prediction* for that fragment. If the schema allows too many such constructs, for example, more than 100,000, the schema expansion becomes excessively large, which consumes too much resources and time.
94
111
95
-
## Add Flat File Encoding action
112
+
## Add a Flat File encoding action
96
113
97
114
### [Consumption](#tab/consumption)
98
115
99
-
1. In the [Azure portal](https://portal.azure.com), open your logic app workflow in the designer.
116
+
1. In the [Azure portal](https://portal.azure.com), open your logic app workflow in the designer, if not already open.
100
117
101
-
1. If you have a blank workflow that doesn't have a trigger, add any trigger you want. Otherwise, continue to the next step.
118
+
1. If your workflow doesn't have a trigger or any other actions that your workflow needs, add those operations first. Flat File operations don't have any triggers available.
102
119
103
-
This example uses the Request trigger, which is named **When a HTTP request is received**, and handles inbound requests from outside the logic app workflow. To add the Request trigger, follow these steps:
104
-
105
-
1. Under the designer search box, select **Built-in**. In the designer search box, enter `HTTP request`.
106
-
107
-
1. From the triggers list, select the Request trigger named **When an HTTP request is received**.
120
+
This example continues with the Request trigger named **When a HTTP request is received**.
108
121
109
-
> [!TIP]
110
-
> Providing a JSON schema is optional. If you have a sample payload from the inbound request,
111
-
> select **Use sample payload to generate schema**, enter the sample payload, and select **Done**.
112
-
> The schema appears in the **Request Body JSON Schema** box.
122
+
1. On the workflow designer, under the step where you want to add the Flat File action, select **New step**.
113
123
114
-
1. Under the step in your workflow where you want to add the **Flat File Encoding** action, choose an option:
124
+
1. Under the **Choose an operation** search box, select **All**. In the search box, enter **flat file**.
115
125
116
-
* To add the **Flat File Encoding** action at the end of your workflow, select **New step**.
126
+
1. From the actions list, select the action named **Flat File Encoding**.
117
127
118
-
* To add the **Flat File Encoding** action between existing steps, move your pointer over the arrow that connects those steps so that the plus sign (**+**) appears. Select that plus sign, and then select **Add an action**.
128
+

119
129
120
-
1. In the **Choose an operation**search box, enter `flat file`. From the actions list, select the action named **Flat File Encoding**.
130
+
1. In the action's **Content**property, provide the output from the trigger or a previous action that you want to encoding by following these steps:
121
131
122
-

132
+
1. Click inside the **Content**box so that the dynamic content list appears.
123
133
124
-
1. Click inside the **Content** box so that the dynamic content list appears. From the list, in the **When a HTTP request is received** section, select the **Body** property, which contains the request body output from the trigger and the content to encode.
134
+
1. From the dynamic content list, select the flat file content that you want to encode.
135
+
136
+
For this example, from the dynamic content list, under **When a HTTP request is received**, select the **Body** token, which represents the body content output from the trigger.
125
137
126
138

127
139
@@ -130,20 +142,17 @@ Each time that the flat file schema allows the choice of the next fragment, the
130
142
> select **See more** next to the **When a HTTP request is received** section label.
131
143
> You can also directly enter the content to decode in the **Content** box.
132
144
133
-
1. From the **Schema Name** list, select the schema that's in your linked integration account to use for encoding, for example:
145
+
1. From the **Schema Name** list, select your schema.
134
146
135
147

136
148
137
149
> [!NOTE]
138
-
> If no schema appears in the list, your integration account doesn't contain any schema files
139
-
> to use for encoding. Upload the schema that you want to use to your integration account.
150
+
>
151
+
> If the schema list is empty, either your logic app resource isn't linked to your
152
+
> integration account or your integration account doesn't contain any schema files.
140
153
141
154
1. Save your workflow. On the designer toolbar, select **Save**.
142
155
143
-
1. To test your workflow, send a request to the HTTPS endpoint, which appears in the Request trigger's **HTTP POST URL** property, and include the XML content that you want to encode in the request body.
144
-
145
-
You're now done with setting up your flat file encoding action. In a real world app, you might want to store the encoded data in a line-of-business (LOB) app, such as Salesforce. Or, you can send the encoded data to a trading partner. To send the output from the encoding action to Salesforce or to your trading partner, use the other [connectors available in Azure Logic Apps](../connectors/apis-list.md).
146
-
147
156
### [Standard](#tab/standard)
148
157
149
158
1. In the [Azure portal](https://portal.azure.com), open your logic app workflow in the designer.
@@ -192,10 +201,6 @@ You're now done with setting up your flat file encoding action. In a real world
192
201
193
202
1. Save your workflow. On the designer toolbar, select **Save**.
194
203
195
-
1. To test your workflow, send a request to the HTTPS endpoint, which appears in the Request trigger's **HTTP POST URL** property, and include the XML content that you want to encode in the request body.
196
-
197
-
You're now done with setting up your flat file encoding action. In a real world app, you might want to store the encoded data in a line-of-business (LOB) app, such as Salesforce. Or, you can send the encoded data to a trading partner. To send the output from the encoding action to Salesforce or to your trading partner, use the other [connectors available in Azure Logic Apps](../connectors/apis-list.md).
198
-
199
204
---
200
205
201
206
## Add Flat File Decoding action
@@ -246,10 +251,6 @@ You're now done with setting up your flat file encoding action. In a real world
246
251
247
252
1. Save your workflow. On the designer toolbar, select **Save**.
248
253
249
-
1. To test your workflow, send a request to the HTTPS endpoint, which appears in the Request trigger's **HTTP POST URL** property, and include the XML content that you want to decode in the request body.
250
-
251
-
You're now done with setting up your flat file decoding action. In a real world app, you might want to store the decoded data in a line-of-business (LOB) app, such as Salesforce. Or, you can send the decoded data to a trading partner. To send the output from the decoding action to Salesforce or to your trading partner, use the other [connectors available in Azure Logic Apps](../connectors/apis-list.md).
252
-
253
254
### [Standard](#tab/standard)
254
255
255
256
1. In the [Azure portal](https://portal.azure.com), open your logic app workflow in the designer.
@@ -298,11 +299,17 @@ You're now done with setting up your flat file decoding action. In a real world
298
299
299
300
1. Save your workflow. On the designer toolbar, select **Save**.
300
301
301
-
1. To test your workflow, send a request to the HTTPS endpoint, which appears in the Request trigger's **HTTP POST URL** property, and include the XML content that you want to decode in the request body.
302
+
---
302
303
303
304
You're now done with setting up your flat file decoding action. In a real world app, you might want to store the decoded data in a line-of-business (LOB) app, such as Salesforce. Or, you can send the decoded data to a trading partner. To send the output from the decoding action to Salesforce or to your trading partner, use the other [connectors available in Azure Logic Apps](../connectors/apis-list.md).
304
305
305
-
---
306
+
307
+
## Test your workflow
308
+
309
+
By using Postman or a similar tool and the POST method, send a call to the Request trigger's URL and include the JSON input to transform, for example:
310
+
311
+
To test your workflow, send a request to the HTTPS endpoint, which appears in the Request trigger's **HTTP POST URL** property, and include the XML content that you want to encode or decode in the request body.
0 commit comments