Skip to content

Commit 35c6554

Browse files
committed
custom metadata doc updates
1 parent 35cd0aa commit 35c6554

11 files changed

Lines changed: 95 additions & 5 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
147 KB
Loading
77.6 KB
Loading
53.5 KB
Loading
82.3 KB
Loading

modules/ROOT/pages/int-configure-components.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ Understand the basics of Mule flows, the Mule event structure, including the pay
3434
//add component content
3535
include::partial$acb-component-info.adoc[tags="add-components"]
3636

37+
[[set-custom-metadata-for-component]]
38+
== Set Custom Metadata for a Component
39+
40+
To set custom metadata for a component, add or open the component in the canvas and then apply the metadata using the custom metadata options from the *Metadata* tab, *Expression Builder*, or dataweave functions. For more information, see <<set-custom-metadata-on-metadata-or-data-tab, Set Custom Metadata on the Metadata or Data Tab>> and see <<set-custom-metadata-in-transformation-builder, Set Custom Metadata in Transformation Builder>>.
41+
3742
[[copy-components]]
3843
== Copy Components
3944

modules/ROOT/pages/int-configure-dw-expressions.adoc

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Anypoint Code Builder integrates DataWeave expressions and transformations into
1818
* Object-to-object and array-to-array transformations
1919
* Concatenation of strings, numbers, and booleans
2020
* Type conversions
21+
* Custom metadata for inputs and outputs
2122
2223
Anypoint Code Builder supports these transform mapping use cases:
2324

@@ -79,7 +80,7 @@ The markup `#[]` in the *fx* field also appears in the XML to indicate that the
7980
+
8081
image::int-dw-fx-expression-builder.png["*Expression Builder* interface shows the *Data*, *Functions*, and *Preview* tabs for building DataWeave expressions in the `Set Variable` component"]
8182
+
82-
Use the *Data*, *Functions*, and *Preview* tabs to ease configuration of expressions in your components. Preview the expression output without running your Mule app with data from external sources:
83+
Use the *Data*, *Functions*, and *Preview* tabs to ease configuration of expressions in your components. Select custom metadata for the payload and attributes. Preview the expression output without running your Mule app with data from external sources:
8384

8485
* <<tab-data>>
8586
* <<tab-functions>>
@@ -93,7 +94,7 @@ Use the *Data*, *Functions*, and *Preview* tabs to ease configuration of express
9394
[[tab-data]]
9495
=== Check the Data Structure
9596

96-
To review the data structure of the Mule event, including the payload, attributes, and Mule variables, use the *Data* tab. The tab includes any sample data and is part of *Expression Builder* for a component *fx* field. For example:
97+
To review the data structure of the Mule event, including the payload, attributes, and Mule variables, use the *Data* tab. The tab includes any sample data and custom metadata and is part of *Expression Builder* for a component *fx* field. For example:
9798

9899
[%header,cols="1a,1a"]
99100
|===
@@ -107,9 +108,23 @@ image:int-dw-fx-data-tab-attributes.png["Data tab for expression field with mock
107108

108109
Automatically generated strings are displayed as mock values and are used to generate output for previews, such as in the <<tab-preview, Preview>> tab. The attribute metadata keys in the example come from the configuration of an `HTTP Listener` component in the flow.
109110

110-
The *Input/Output* tab shows the structure of data entering (*Input*) and exiting (*Output*) components. For example:
111+
[[set-custom-metadata-on-metadata-or-data-tab]]
112+
=== Set Custom Metadata on the Metadata or Data Tab
111113

112-
image:int-dw-fx-input-output-sample.png["Input/Output tab for a component"]
114+
The *Metadata* tab shows the structure of data entering (*Input*) and exiting (*Output*) components. For example:
115+
116+
image:int-dw-fx-input-output-sample.png["Metadata tab for a component"]
117+
118+
From the *Metadata* tab or the *Data* tab of *Expression Builder*, you can manage component metadata by setting, clearing, or editing custom definitions for inputs and outputs. Each payload, attribute, or variable supports only one custom metadata assignment at a time.
119+
120+
To set custom metadata from the *Metadata* tab or the *Data* tab of *Expression Builder*:
121+
122+
. Click *No metadata selected* if metadata isn't already set or click the name of the custom metadata. If default metadata is being used, click *Default*.
123+
. Click *Set Custom Metadata*.
124+
. Select, edit, or preview existing custom metadata or create new custom metadata. See <<create-custom-metadata, Create Custom Metadata>> for more information about creating custom metadata. See <<edit-custom-metadata, Edit Custom Metadata>> for more information about editing custom metadata.
125+
. Click *Apply and Close*.
126+
127+
To clear custom metadata, click the name of the custom metadata and then click *Clear Custom Metadata*. The metadata is cleared from the component.
113128

114129
[[tab-functions]]
115130
=== List DataWeave Functions and Get Documentation
@@ -286,6 +301,20 @@ If needed, map multiple source field to a target field, and then the Transform B
286301
+
287302
You can select the generated sample or provide your own <<sample-data, sample data>>.
288303

304+
[[set-custom-metadata-in-transformation-builder]]
305+
=== Set Custom Metadata in Transformation Builder
306+
307+
In Transformation Builder, you can manage component metadata by setting, clearing, or editing custom definitions for inputs and outputs. Each payload, attribute, or variable supports only one custom metadata assignment at a time.
308+
309+
To set custom metadata:
310+
311+
. Click *No metadata selected* if metadata isn't already set or click the name of the custom metadata. If default metadata is being used, click *Default*.
312+
. Click *Set Custom Metadata*.
313+
. Select, edit, or preview existing custom metadata or create new custom metadata. See <<create-custom-metadata, Create Custom Metadata>> for more information about creating custom metadata. See <<edit-custom-metadata, Edit Custom Metadata>> for more information about editing custom metadata.
314+
. Click *Apply and Close*.
315+
316+
To clear custom metadata, click the name of the custom metadata and then click *Clear Custom Metadata*. The metadata is cleared from the component.
317+
289318
[[sample-data]]
290319
== Provide Sample Data for a DataWeave Expression
291320

@@ -462,4 +491,3 @@ When complete, Anypoint Code Builder shows a message that the dependency was suc
462491
* xref:troubleshoot-dataweave.adoc[]
463492
* xref:int-create-integrations.adoc#add-components[Add a Component to Your Project]
464493
* xref:acb-reference.adoc[]
465-

0 commit comments

Comments
 (0)