Skip to content

Commit 199e0bf

Browse files
committed
Updates for flat files
1 parent ddc5936 commit 199e0bf

File tree

2 files changed

+68
-57
lines changed

2 files changed

+68
-57
lines changed

articles/logic-apps/logic-apps-enterprise-integration-flatfile.md

Lines changed: 60 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.date: 09/01/2022
1414

1515
[!INCLUDE [logic-apps-sku-consumption-standard](../../includes/logic-apps-sku-consumption-standard.md)]
1616

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 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.
1818

1919
> [!NOTE]
2020
>
@@ -24,10 +24,15 @@ While no **Flat File** triggers are available, you can use any trigger or action
2424

2525
This article shows how to add the **Flat File** encoding and decoding actions to your workflow.
2626

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+
2731
For more information, review the following documentation:
2832

2933
* [Consumption versus Standard logic apps](logic-apps-overview.md#resource-type-and-host-environment-differences)
3034
* [Integration account built-in connectors](../connectors/built-in.md#integration-account-built-in)
35+
* [[schema](logic-apps-enterprise-integration-schemas.md) for encoding and decoding the XML content.
3136
* [Built-in connectors overview for Azure Logic Apps](../connectors/built-in.md)
3237
* [Managed or Azure-hosted connectors in Azure Logic Apps](/connectors/connector-reference/connector-reference-logicapps-connectors)
3338

@@ -45,7 +50,22 @@ For more information, review the following documentation:
4550

4651
* [Create a Standard logic app workflow with single-tenant Azure Logic Apps](create-single-tenant-workflows-azure-portal.md)
4752

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.
4969
5070
* 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.
5171

@@ -61,67 +81,59 @@ For more information, review the following documentation:
6181

6282
* 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.
6383

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.
6585

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.
6787

88+
## Limitations
6889

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.
7091

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.
7293

73-
* Exists in the same location or Azure region as your logic app resource.
94+
## Upload schema
7495

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:
7697

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).
7899

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).
80101

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+
<a name="upload-schema-integration-account"></a>
82103

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 integration account
84105

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.
88106

89-
## Limits
107+
<a name="upload-schema-standard-logic-app"></a>
90108

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
92110

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.
94111

95-
## Add Flat File Encoding action
112+
## Add a Flat File encoding action
96113

97114
### [Consumption](#tab/consumption)
98115

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.
100117

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.
102119

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**.
108121

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**.
113123

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**.
115125

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**.
117127

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+
![Screenshot showing Azure portal and Consumption workflow designer with `flat file` in search box and `Flat File Encoding` action selected.](./media/logic-apps-enterprise-integration-flatfile/flat-file-encoding-consumption.png)
119129

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:
121131

122-
![Screenshot showing the Azure portal and Consumption designer with "flat file" in search box and the "Flat File Encoding" action selected.](./media/logic-apps-enterprise-integration-flatfile/flat-file-encoding-consumption.png)
132+
1. Click inside the **Content** box so that the dynamic content list appears.
123133

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.
125137

126138
![Screenshot showing the Consumption designer and the "Content" property with dynamic content list and content selected for encoding.](./media/logic-apps-enterprise-integration-flatfile/select-content-to-encode-consumption.png)
127139

@@ -130,20 +142,17 @@ Each time that the flat file schema allows the choice of the next fragment, the
130142
> select **See more** next to the **When a HTTP request is received** section label.
131143
> You can also directly enter the content to decode in the **Content** box.
132144
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.
134146

135147
![Screenshot showing the Consumption designer and the opened "Schema Name" list with selected schema to use for encoding.](./media/logic-apps-enterprise-integration-flatfile/select-encoding-schema-consumption.png)
136148

137149
> [!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.
140153
141154
1. Save your workflow. On the designer toolbar, select **Save**.
142155

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-
147156
### [Standard](#tab/standard)
148157

149158
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
192201
193202
1. Save your workflow. On the designer toolbar, select **Save**.
194203

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-
199204
---
200205

201206
## 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
246251
247252
1. Save your workflow. On the designer toolbar, select **Save**.
248253

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-
253254
### [Standard](#tab/standard)
254255

255256
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
298299
299300
1. Save your workflow. On the designer toolbar, select **Save**.
300301

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+
---
302303

303304
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).
304305

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.
312+
306313

307314
## Next steps
308315

0 commit comments

Comments
 (0)