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
Workflow actions such as **Transform XML** and **Liquid** require a map to perform their tasks. For example, the **Transform XML** action requires a map to convert XML between formats. A map is an XML document that uses [Extensible Stylesheet Language Transformation (XSLT)](https://www.w3.org/TR/xslt/) language to describe how to convert data from XML to another format and has the .xslt file name extension. The map consists of a source XML schema as input and a target XML schema as output. You can define a basic transformation, such as copying a name and address from one document to another. Or, you can create more complex transformations using the out-of-the-box map operations. You can manipulate or control data by using different built-in functions, such as string manipulations, conditional assignments, arithmetic expressions, date time formatters, and even looping constructs.
14
16
15
17
For example, suppose you regularly receive B2B orders or invoices from a customer who uses the YearMonthDay date format (YYYYMMDD). However, your organization uses the MonthDayYear date format (MMDDYYYY). You can define and use a map that transforms the YYYYMMDD format to the MMDDYYYY format before storing the order or invoice details in your customer activity database.
16
18
17
-
This how-to guide shows how to add a map to your integration account. If you're working with a Standard logic app workflow, you can also add a map directly to your logic app resource.
19
+
This guide shows how to add a map for your workflow to use. You can add maps either to your linked integration account, or if you have a Standard logic app, you can add maps directly to your logic app resource.
18
20
19
21
## Prerequisites
20
22
@@ -128,7 +130,7 @@ Your map must have the following attributes and a `CDATA` section that contains
128
130
129
131
*`namespace` is the namespace in your assembly that includes the custom code.
130
132
131
-
The following example shows a map that references an assembly named `XslUtilitiesLib` and calls the `circumference` method from the assembly.
133
+
The following example shows a map that references an assembly named **XslUtilitiesLib** and calls the `circumference` method from the assembly.
132
134
133
135
```xml
134
136
<?xml version="1.0" encoding="UTF-8"?>
@@ -244,26 +246,36 @@ After your assembly finishes uploading, the assembly appears in the **Assemblies
244
246
245
247
### [Standard](#tab/standard)
246
248
247
-
A Standard logic app resource supports referencing external assemblies from maps, which enable directly calling custom .NET code from XSLT maps. For more information about this capability, see [Create and run .NET Framework code from Standard workflows](create-run-custom-code-functions.md).
249
+
A Standard logic app resource supports referencing external assemblies from maps, which enable directly calling custom .NET code from XSLT maps:
250
+
251
+
| Assembly type | Description |
252
+
|---------------|-------------|
253
+
|**Client/SDK Assembly (.NET Framework)**| This assembly type provides storage and deployment of client and custom SDK for the .NET Framework. For example, the [SAP built-in connector](/azure/logic-apps/connectors/built-in/reference/sap/) uses these assemblies to load the SAP NCo non-redistributable DLL files. |
254
+
|**Client/SDK Assembly (Java)**| This assembly type provides storage and deployment of custom SDK for Java. For example, the [JDBC built-in connector](/azure/logic-apps/connectors/built-in/reference/jdbc/) uses these JAR files to find JDBC drivers for custom relational databases (RDBs). |
255
+
|**Custom Assembly (.NET Framework)**| This assembly type provides storage and deployment of custom DLLs. For example, the [**Transform XML** operation](logic-apps-enterprise-integration-transform.md) uses these assemblies for the custom transformation functions that are required during XML transformation. |
256
+
257
+
For more information about this capability, see [Create and run .NET Framework code from Standard workflows](create-run-custom-code-functions.md).
258
+
259
+
#### Azure portal
248
260
249
261
1. In the [Azure portal](https://portal.azure.com) search box, find and open your logic app resource.
250
262
251
263
1. On the logic app menu, under **Artifacts**, select **Assemblies**.
252
264
253
265
1. On the **Assemblies** page toolbar, select **Add**. On the **Add Assembly** pane, under **Assembly Type**, select the following type for your assembly, based on your scenario:
254
266
255
-
| Assembly type | Description |
256
-
|---------------|-------------|
257
-
|**Client/SDK Assembly (.NET Framework)**| This assembly type provides storage and deployment of client and custom SDK for the .NET Framework. For example, the [SAP built-in connector](/azure/logic-apps/connectors/built-in/reference/sap/) uses these assemblies to load the SAP NCo non-redistributable DLL files. |
258
-
|**Client/SDK Assembly (Java)**| This assembly type provides storage and deployment of custom SDK for Java. For example, the [JDBC built-in connector](/azure/logic-apps/connectors/built-in/reference/jdbc/) uses these JAR files to find JDBC drivers for custom relational databases (RDBs). |
259
-
|**Custom Assembly (.NET Framework)**| This assembly type provides storage and deployment of custom DLLs. For example, the [**Transform XML** operation](logic-apps-enterprise-integration-transform.md) uses these assemblies for the custom transformation functions that are required during XML transformation. |
260
-
261
267
1. Now, either drag-and-drop your assemblies to the **Upload Files** area, or browse to and select your assemblies.
262
268
263
269
1. When you're done, select **Upload Files**.
264
270
265
271
Your selected assemblies now appear on your logic app's **Assemblies** page.
266
272
273
+
#### Visual Studio Code
274
+
275
+
1. In your Standard logic app project, open the following folders: **Artifacts** > **lib** > **custom** > **net472**.
276
+
277
+
1. Add your assemblies to the **net472** folder.
278
+
267
279
---
268
280
269
281
<aname="add-map"></a>
@@ -328,7 +340,7 @@ The following steps apply only if you want to add a map directly to your Standar
328
340
329
341
1. On the **Maps** pane toolbar, select **Add**.
330
342
331
-
1. On the **Add Map** pane, enter a unique name for your map and include the `.xslt` extension name.
343
+
1. On the **Add Map** pane, enter a unique name for your map and include the **.xslt** extension name.
332
344
333
345
1. Next to the **Map** box, select the folder icon. Select the map to upload.
334
346
@@ -374,7 +386,7 @@ To update an existing map, you have to upload a new map file that has the change
374
386
375
387
1. On the **Maps** pane toolbar, select **Add**.
376
388
377
-
1. Under **Add map**, enter a unique name for your map and include the `.xslt` extension name.
389
+
1. Under **Add map**, enter a unique name for your map and include the **.xslt** extension name.
378
390
379
391
1. Next to the **Map** box, select the folder icon. Select the map to upload.
In enterprise integration business-to-business (B2B) scenarios, you might have to convert XML between formats. Your logic app workflow can transform XML by using the **Transform XML** action and a predefined [*map*](logic-apps-enterprise-integration-maps.md). For example, suppose you regularly receive B2B orders or invoices from a customer that uses the YearMonthDay date format (YYYYMMDD). However, your organization uses the MonthDayYear date format (MMDDYYYY). You can create and use a map that transforms the YearMonthDay format to the MonthDayYear format before storing the order or invoice details in your customer activity database.
17
+
In enterprise integration business-to-business (B2B) scenarios, you might have to convert XML between formats. Your logic app workflow can transform XML by using the **Transform XML** action and a predefined [*map*](logic-apps-enterprise-integration-maps.md).
18
18
19
-
If you're new to logic apps, review [What is Azure Logic Apps](logic-apps-overview.md)? For more information about B2B enterprise integration, review [B2B enterprise integration workflows with Azure Logic Apps and Enterprise Integration Pack](logic-apps-enterprise-integration-overview.md).
19
+
For example, suppose you regularly receive B2B orders or invoices from a customer that uses the YearMonthDay date format (YYYYMMDD). However, your organization uses the MonthDayYear date format (MMDDYYYY). You can create and use a map that transforms the YearMonthDay format to the MonthDayYear format before storing the order or invoice details in your customer activity database.
20
20
21
21
## Prerequisites
22
22
@@ -44,73 +44,108 @@ If you're new to logic apps, review [What is Azure Logic Apps](logic-apps-overvi
44
44
45
45
> [!NOTE]
46
46
>
47
-
> The Liquid built-in connector lets you select a map that you previously uploaded to your logic app resource or to a linked integration account, but not both.
47
+
> The Liquid built-in connector lets you select a map that you previously uploaded to your logic app resource or to a linked integration account, but not both.
48
48
49
49
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.
50
50
51
51
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.
52
52
53
53
## Add Transform XML action
54
54
55
-
1. In the [Azure portal](https://portal.azure.com), open your logic app resource and workflow in designer view.
55
+
### [Standard](#tab/standard)
56
56
57
-
1.If you have a blank workflow that doesn't have a trigger, add any trigger you want. This example uses the Request trigger. Otherwise, continue to the next step.
57
+
1.In the [Azure portal](https://portal.azure.com), open your Standard logic app and workflow in the designer.
58
58
59
-
To add the Request trigger, in the designer search box, enter `HTTP request`, and select the Request trigger named **When an HTTP request is received**.
59
+
1. If you have a blank workflow that doesn't have a trigger, [follow these general steps to add any trigger you want](create-workflow-with-trigger-or-action.md?tabs=standard#add-trigger). Otherwise, continue to the next step.
60
60
61
-
1. Under the step in your workflow where you want to add the **Transform XML**action, choose one of the following steps:
61
+
This example uses the **Request**trigger.
62
62
63
-
For a Consumption or ISE-based logic app workflow, choose a step:
63
+
1. Under the step in your workflow where you want to add the **Transform XML** action, [follow these general steps to add the action named **Transform XML**](create-workflow-with-trigger-or-action.md?tabs=standard#add-action).
64
64
65
-
* To add the **Transform XML** action at the end of your workflow, select **New step**.
65
+
1. In the **Content** box, specify the XML content that you want to transform using any XML data that you receive in the HTTP request.
66
66
67
-
* To add the **Transform XML** 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**.
67
+
1. To select outputs from previous operations in the workflow, in the **Transform XML** action, click inside the **Content** box, and select the dynamic content list option (lightning icon).
68
68
69
-
For a Standard-based logic app workflow, choose a step:
69
+
1. From the dynamic content list, select the token for the content that you want to transform.
70
70
71
-
* To add the **Transform XML** action at the end of your workflow, select the plus sign (**+**), and then select **Add an action**.
71
+

72
72
73
-
* To add the **Transform XML** action between existing steps, select the plus sign (**+**) that appears between those steps, and then select **Add an action**.
73
+
This example selects the **Body** token from the trigger.
74
74
75
-
1. Under **Choose an operation**, select **Built-in**. In the search box, enter `transform xml`. From the actions list, select **Transform XML**.
75
+
> [!NOTE]
76
+
>
77
+
> Make sure that you select XML content. If the content isn't XML or is base64-encoded,
78
+
> you must specify an expression that processes the content. For example, you can use
> such as `base64ToBinary()` to decode content or `xml()` to process the content as XML.
81
+
82
+
1. From the **Map Source** list, select the location where you uploaded your map, either your **LogicApp** resource or your **IntegrationAccount**.
83
+
84
+
1. From the **Map** list, select your map.
85
+
86
+
1. When you're done, save your workflow.
87
+
88
+
You're now finished setting up your **Transform XML** action. In a real world app, you might want to store the transformed data in a line-of-business (LOB) app such as SalesForce. To send the transformed output to Salesforce, add a Salesforce action.
89
+
90
+
1. To test your transformation action, trigger and run your workflow. For example, for the Request trigger, send a request to the trigger's endpoint URL.
91
+
92
+
The **Transform XML** action runs after your workflow is triggered and when XML content is available for transformation.
76
93
77
-
1. To specify the XML content for transformation, you can use any XML data you receive in the HTTP request. Click inside the **Content** box so that the dynamic content list appears.
94
+
### [Consumption](#tab/consumption)
78
95
79
-
The dynamic content list shows property tokens that represent the outputs from the previous steps in the workflow. If the list doesn't show an expected property, check the trigger or action heading in the list and whether you can select **See more**.
96
+
1. In the [Azure portal](https://portal.azure.com), open your Consumption logic app and workflow in the designer.
80
97
81
-
For a Consumption or ISE-based logic app workflow, the designer looks like this example:
98
+
1. If you have a blank workflow that doesn't have a trigger, [follow these general steps to add any trigger you want](create-workflow-with-trigger-or-action.md?tabs=consumption#add-trigger). Otherwise, continue to the next step.
82
99
83
-

100
+
This example uses the **Request** trigger.
84
101
85
-
For a Standard logic app workflow, the designer looks like this example:
102
+
1. Under the step in your workflow where you want to add the **Transform XML** action, [follow these general steps to add the action named **Transform XML**](create-workflow-with-trigger-or-action.md?tabs=consumption#add-action).
86
103
87
-

104
+
1. In the **Content** box, specify the XML content that you want to transform using any XML data that you receive in the HTTP request.
88
105
89
-
1.From the dynamic content list, select the property token for the content you want to validate.
106
+
1.To select outputs from previous operations in the workflow, in the **Transform XML** action, click inside the **Content** box, which opens the dynamic content list.
90
107
91
-
This example selects the **Body**token from the trigger.
108
+
1. From the dynamic content list, select the token for the content that you want to transform.
92
109
93
-
> [!NOTE]
94
-
> Make sure that the content you select is XML. If the content is not XML or is base64-encoded, you must specify an expression
95
-
> that processes the content. For example, you can use [expression functions](workflow-definition-language-functions-reference.md),
96
-
> such as `base64ToBinary()` to decode content or `xml()` to process the content as XML.
110
+

97
111
98
-
1. To specify the map to use for transformation, open the **Map**list, and select the map that you previously added.
112
+
This example selects the **Body**token from the trigger.
99
113
100
-
1. When you're done, make sure to save your logic app workflow.
114
+
> [!NOTE]
115
+
>
116
+
> Make sure that you select XML content. If the content isn't XML or is base64-encoded,
117
+
> you must specify an expression that processes the content. For example, you can use
> such as `base64ToBinary()` to decode content or `xml()` to process the content as XML.
120
+
121
+
1. From the **Map** list, select your map.
122
+
123
+
1. When you're done, save your workflow.
101
124
102
125
You're now finished setting up your **Transform XML** action. In a real world app, you might want to store the transformed data in a line-of-business (LOB) app such as SalesForce. To send the transformed output to Salesforce, add a Salesforce action.
103
126
104
127
1. To test your transformation action, trigger and run your workflow. For example, for the Request trigger, send a request to the trigger's endpoint URL.
105
128
106
129
The **Transform XML** action runs after your workflow is triggered and when XML content is available for transformation.
107
130
131
+
---
132
+
108
133
## Advanced capabilities
109
134
110
135
### Reference assemblies or call custom code from maps
111
136
112
137
The **Transform XML** action supports referencing external assemblies from maps, which enable directly calling custom .NET code from XSLT maps. For more information, see [Add XSLT maps for workflows in Azure Logic Apps](logic-apps-enterprise-integration-maps.md).
113
138
139
+
### Reference extension objects
140
+
141
+
In Standard workflows, the **Transform XML** action supports specifying an XML extension object to use with your map.
142
+
143
+
1. In the **Transform XML** action, open the **Advanced parameters** list, and select **XML Extension Object**, which adds the parameter to the action.
144
+
145
+
1. In the **XML Extension Object** box, specify your extension object, for example:
146
+
147
+
:::image type="content" source="media/logic-apps-enterprise-integration-transform/xml-extension-object-standard.png" alt-text="Screenshot shows Transform XML action with XML Extension Object parameter and value." lightbox="media/logic-apps-enterprise-integration-transform/xml-extension-object-standard.png":::
148
+
114
149
### Byte order mark
115
150
116
151
By default, the response from the transformation starts with a byte order mark (BOM). You can access this functionality only when you work in the code view editor. To disable this functionality, set the `transformOptions` property to `disableByteOrderMark`:
0 commit comments